I started looking for a microcontroller that I could play with as
a hobbyist. There are a few attributes I wanted:
- Parts readily available. I used the Digikey catalog as they have many
families of controllers available and they're a great distributor.
- Parts readily available in DIP packages for prototyping (see my banner).
- Reasonably C-friendly instruction set. I used Z-80 in college and it
has an instruction set designed with C in mind. That's what all those
SP-relative instructions are for: accessing stack frame variables. I got
an 8-pin development board, and it did something known as not working.
I don't know if it was a bum steer or what, but I couldn't get a program to
load into the flash and run. Besides, Zilog's website isn't real efficient at
telling you in detail what the differences between the processor families are.
I heard Microchip's lab emulator was good and reasonably cheap. But as anybody
who's written PIC assembly knows, banking and paging bits will be your bane.
I like this quote from the PIC vs. AVR smackdown (I fixed the English):
Overall, I've written some asm for both processors and I hate to
it to PIC users but writing assembly for PIC is akin to stabbing
in the face. [Except it's not even that efficient, because you have
more the knife into the working register first (movlw KNIFE), and
then you can stab yourself (movwf FACE).]
I just didn't feel like spending a third of the flash memory flipping those bits. Not to
mention a fixed 4 or 8-level stack that only holds addresses, not data--oh just forget it.
So, I got the dragon and a few AVR parts and started tinkering. I was stunned at how the
AVR studio and WinAVR compilers installed and just ran. Then I wrote a timer ISR.
It worked the first time. Then I started twiddling I/O pins. Set the DDR, and go. They just worked.
Everything is in a good default reset state. If you turn a peripheral device on, it takes over the
I/O pins just like the manual says and works.
I wire wrapped a 6-pin header for ISP (In-system programming) and hooked it up to the Dragon
board and with one keystroke I compile, and one mouse click load the flash with the new software
and the part comes out of reset running.
So, I'm a happy camper.