[Microcontrollers] Run instructions from external memory.
I've become interested in microprocessors and their funky microcontroller cousins. I know it is possible to add on external EEPROM, and SRAM.
However I am trying to find out if there is anyway to break the limit on program space. For instance loading instructions from external memory somehow.
Since this may be a very platform specific I'm mainly interested in these microcontrollers at the moment:
ATMEGA32U4
AT90USB1286
MK20DX128
I would prefer if I could load instructions into external SRAM and run them from there but I understand none of this may be possible, but I had to at least ask for certain.
Thanks much!
Edit: Wow so many replies, thank you to everyone who has provided advice. I will look into all of it before moving forward.
To those asking why I wanted to do this: I've been interested in microcontrollers for a while now. Not having extensive experience in pcbs and soldering I gravitated towards the Basic Stamp as an entry point. However at $50 a pop that was just unrealistically expensive for most projects I could imagine.
Then a while ago I learned about the Teensy line of microcontroller development boards. Breadboard friendly and at around $20 that seemed more realistic. However I never got around to purchasing any and with other real life things going on I forgot about them and electronics for a while.
Recently a friend was asking me if I knew an easy way to jump into microcontrollers without soldering experience so I showed him the Teensy boards and he purchased one and loved it. That resparked my interest not only in microcontrollers but digital electronics in general.
Another friend had gotten into assembly code and was working on a custom bootloader for x86. Assembly being another long lost interest I decided to dabble in it via various 6502 emulators then a virtual pc. I found it challenging but fun and wished I had something physical to use assembly on, something real, that I was programming at such a level.
Ahh microcontollers, they allow assembly. I could screw around all year with one of them I bet. Well I want a display and then I still need to use a pc to program it. Hmm, I'd really like it to be more pc like, maybe with a keyboard, oh and tv support or vga and maybe some sound...
Before I knew it I had designed a homebrew computer in my head based around a 6502 microprocessor. It still had a ton of gaps, things I simply did not know but that made it all the more interesting.
So I began planning out things and basically ended up with a jacked up half-assed Apple II without any video.
Discussing it with some friends one suggested I build it using a microcontroller instead, get the benefits of on-chip memory. For a while I entertained the idea, they were faster than a 6502, project would be easier. A Teensy had between 25 and 46 IO lines, enough to communicate with external devices like video and sound, I could multitask the USB to support the keyboard. Lots of pros.
However one con, 100,000 write cycles. 100,000 is probably enough but in my geekiness making something with only 100,000 write cycles and calling it a computer seemed a bit of a stretch, and all those shortcuts would take away from the feeling of accomplishment as well.
So my latest idea and the one that brought me here was using a microcontroller as a microprocessor, loading and running external code to preserve the internal flash however still being able to utilize the internal memory and other functions like ADC, available IO pins permitting.
So as it stands I have a lot of potential directions I can go each with pros and cons and I'll have to weigh things carefully as I don't have a ton of cash to invest in any personal project these days. As it is it will probably be into the New Year until I'm certain of what I want to get.
One further advantage of the Teensy would be being able to use it for another project should the homebrew pc bomb out.
And before anyone tells me I'm aware there are designs for homebrew PCs online and all the info I could need to know to build one in a day, but I want the challenge of designing it myself as much as possible. :)
So thanks again everyone!
Posted Nov 4, 2013, 10:35 AM UTC · edited