It took me hours of testing to get the serial port on the AT90CAN128 to communicate with my PC. I kept getting corrupted data sent back from the board, and was getting so frustrating that I was ready to give up. Finally, I figured out that Olimex doesn't properly set the fuses on the MCU before shipping them out (thanks to evnow
, for giving me a piece of the puzzle). Use avrdude to set the low fuse:
avrdude -c usbtinyisp -p at90can128 -Ulfuse:w:0xFF:m
This clears CKDIV8 so that the clock runs at the proper speed.
More details in my blog:
AVR CAN Bus Project – Step 2: Programming Low Fuse http://blog.lincomatic.com/?p=415
Now, I can finally start working on wiring up the MC2551 CAN bus transceiver chip. BTW, the completed hardware will be software compatible with the AVR-CAN board, and thus, Gary's SOC meter firmware should be able to run on it, as well.