Fabio board build log
byon 08-11-2010 at 05:51 AM (3970 Views)
So, I built my first PCB completely in the fablab (see thread here). And I got it to work to the design. Unfortunately, it isn't working quite how I wanted it to, for a number of reasons.
1) The ICSP programming header doesn't have two pins hooked up in the original design. Neither the VCC or RESET pins were connected to *anything*. This made it, well... kind of hard to program the device. So I soldered a couple of wire-wrap wires to the pins in question. I could then program the device using my STK500 on my Windows PC using AVR Studio.
2) I haven't been able to get the Arduino bootloader to work on the board. I think this is because the device I used was an ATmega88PA, rather than the ATmega168 used in the Fabio. The chips are functionally identical, except for the amount of flash memory. It may be that is the problem, I don't know.
3) The programming instructions for the Fabio are... well, a little light. That's a nice way to put it. The correct way to say it is "they are incomplete". They don't actually talk about programming the bootloader using the ICSP headers at all. So I've been trying to figure out from what they do have there how to program it. And I've been unsuccessful (so far).
4) I like using a Mac laptop when I'm doing stuff at home. I don't actually like sitting at my Windows PC, since it kind of removes me from the activities going on in the house. Until tonight, I couldn't use my mac to program via the ICSP port because I didn't know how to make the programmer I have work with my Mac laptop.
Anyway, #1 is fixed. #2 and #3 are things I'll work on later (hopefully successfully...). I got #4 done tonight, and this is how I did it.
My Mac doesn't have a serial port. The STK500 programmer I have interfaces to the computer via a serial port. So I need a USB to serial adapter. I bought one from Sparkfun (I believe), and it worked fine on my PC. But no drivers on the disk for my Mac. Also, I couldn't figure out what the thing was, either from markings on the cable or from the driver disk that came with it (I'm sure I *could* have somehow extracted it from the content of the disk, but I didn't do that).
I plugged the USB serial device into my Mac, and using the system profiler, was able to determine that the device was product ID 0x2303 from Prolific Technology Inc. A short google search later had me downloading the mac adapter from this page. After a reboot, the Mac prompted me to set up a new network device. I didn't really know what to enter, so I just hit apply, and closed the window. After that, the device /dev/cu.usbserial showed up.
I installed the AVR Crosspack next. This gives me the whole package of various command line tools to deal with AVR development on the Mac. Using avrdude (and some experimentation), did the following:
sudo avrdude -p m88 -c stk500v2 -P /dev/cu.usbserial -n -v
I ended up with an error about a bad signature, but it worked!
After a quick Google search, I found out that the ATmega88 device has a different signature than the ATmega88P device. I don't know what the difference in the chip is, but I found this bug report, and copied the file attached to it into my avrdude.conf file. After that, the following worked just fine (only difference is in the device name - m88p instead of m88):
sudo avrdude -p m88p -c stk500v2 -P /dev/cu.usbserial -n -v