DIY AT90CANxx CAN-Capture Project

My Nissan Leaf Forum

Help Support My Nissan Leaf Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
lincomatic said:
Any baud rate is fine. How about 9600 just to be safe.
I don't understand the question about the clock.
Thanks.
Here is the hex for a sample code from Olimex.

http://www.olimex.com/dev/soft/avr/AVR-CAN/avr-can_UART.hex

You can find it on their avr-can page.

http://www.olimex.com/dev/avr-can.html
 
evnow said:
lincomatic said:
Any baud rate is fine. How about 9600 just to be safe.
I don't understand the question about the clock.
Thanks.
Here is the hex for a sample code from Olimex.

http://www.olimex.com/dev/soft/avr/AVR-CAN/avr-can_UART.hex

You can find it on their avr-can page.

http://www.olimex.com/dev/avr-can.html

Perfect! Thanks!
 
Woohoo! Got the serial working now. The AVR-CAN sample program was sending back the same corrupted data as my Arduino. It turns out that Olimex didn't program the fuse bits. The low fuse was set to 0x4F, and thus, had CKDIV8 turned on. I changed the low fuse to 0xFF using avrdude:

avrdude -c usbtinyisp -p at90can128 -Ulfuse:w:0xFF:m

And voila, no more garbled serial data! Here is a convenient fuse calculator:
http://www.engbedded.com/fusecalc/
 
My AVR-CAN boards all appear to have lfuse = 0xCF, when delivered.

You are speaking of the AT90CAN128 on the Header Board,
NOT the uP on the Olimex 16 MHz AVR-CAN Development Board, right?

Is that Header Board made by Olimex, or somebody else?
 
garygid said:
My AVR-CAN boards all appear to have lfuse = 0xCF, when delivered.

You are speaking of the AT90CAN128 on the Header Board,
NOT the uP on the Olimax 16 MHz AVR-CAN Development Board, right?

Is that Header Board made by Olimax, or somebody else?

Right, I have the header board. It's also by Olimex.
 
Back
Top