dot dash dash dash, dot dash dash dot, dot dash dash

I got my AVR to blink my initials in morse code last night. It was a very exhausting battle that took hours. Here’s what I learned:

  • AVR assembly can often highly depend on which actual AVR you have, and they are all very similar but not alike, so cutting and pasting assembly language code rarely, if ever, works.
  • I really need to get a printed, bound copy of the datasheet. I hate reading reference materials on the computer screen.
  • The default WinAVR tools don’t have very much automation. You can’t just create a new project, you have to write your own makefiles and everything, and editing makefiles is about as appealing as eating dirt. I’m sure I could get assembler working with programmers notepad but oh my god how boring.
  • AVR Studio 4 has an awesome simulation environment, and when you debug your assembly language code you can step through it instruction by instruction, have breakpoints and everything.
  • My parallel cable doesn’t work with AVR Studio 4. It might work with AVR Studio 3.5 but that bombs when I try to install it on my computer (the installer is a 16 bit windows exe!) Also, Studio 3.5 doesn’t have the simulator.
  • AVR Studio 4 is buggy as hell. I’ll be typing along, and suddenly the backspace key will stop working. Or the arrow keys. I can fix it by restarting AVR Studio but omg how annoying!
  • I can use post-assemble events to start up avrdude to flash my AVR for me, BUT, the post assemble event fires every time so if I have an assembler error it wipes my working version. I suppose I can get around that by writing a batch file to test for the existence of the assembled file before I run avrdude, but I’m having a hard time imagining something I want to do less than writing batch files.
  • My avrdude post build event (set by going to Project -> Assembler options -> Advanced options) is avrdude -p atmega168 -P lpt1 -c dapa -E reset -U flash:w:[filename].hex and I hope I never have to learn what all of those options mean.
  • When I use avrdude from within Programmers Notepad, it works fine every time. But when I use it as a post-assemble event, eventually it pops the parallel port into some goofy state so I have to unplug the ICSP cable to get out of the reset state. This is highly annoying.
  • The above points are pointing me in the direction of spending the $$ for a real AVR programming cable.
  • I’m doing a lot better with the coding of the microcontroller than I am with designing the interface circuits. Gee, I wonder why?

Leave a Reply