Difference between revisions of "USB-CAN"
(Imported from TWiki by twiki2mediawiki.py) |
(Imported from TWiki by twiki2mediawiki.py) |
||
Line 27: | Line 27: | ||
V1.07 has baud rate irregularity, see http://www.mictronics.de/projects/usb-can-bus/ user comments ~jan2011 -- Main.PhilipCourt - 2011-04-20 |
V1.07 has baud rate irregularity, see http://www.mictronics.de/projects/usb-can-bus/ user comments ~jan2011 -- Main.PhilipCourt - 2011-04-20 |
||
+ | == NOTES == |
||
+ | ====== Fuses: ====== |
||
+ | http://www.engbedded.com/fusecalc/ |
||
+ | |||
+ | Ebay device fuse settings: h,l,e 0xD1, 0xD0, 0xFB |
||
+ | |||
+ | Mictronics recommended 0xD0, 0xF7, 0xFB |
||
+ | |||
+ | Our fuse settings: 0xD9, 0xD0, 0xFB |
||
== CAN PINOUT == |
== CAN PINOUT == |
||
− | * Can pin out for USB<->CAN: <br /> |
+ | * Can pin out for USB<->CAN: <br /> [[Image:CAN_PinOut.PNG|CAN_PinOut.PNG]] |
-- Main.PhilipCourt - 2011-06-29 |
-- Main.PhilipCourt - 2011-06-29 |
||
− | * RJ45 Pinout: <br /> |
+ | * RJ45 Pinout: <br /> [[Image:rj45pinout.gif|rj45pinout.gif]] |
− | |||
JF2 [[LATAswitch|Lata]] cables connect to CAT5 cables as follows: |
JF2 [[LATAswitch|Lata]] cables connect to CAT5 cables as follows: |
||
* CANH to CAT5 pin1 |
* CANH to CAT5 pin1 |
Revision as of 20:19, 6 July 2011
Two step programming procedure:
STEP ONE
MProg.exe
use USB_CAN.ept on Desktop
STEP TWO
Atmel parallel programmer (STK200 complient?) C:\Documents and Settings\eche027\Desktop\firm>avrdude -c stk200 -p ATmega162 -U flash:w:firmware_1.07.hex -U hfuse:w:0xD9:m
Or Make Program will do the same thing.
The following nearly works - it lacks the JTAG fuse disable, which breaks functionality
C:\Documents and Settings\eche027\Desktop\firm>avrdude -c stk200 -p ATmega162 -U flash:w:firmware_1.07.hexavrdude: AVR device initialized and ready to accept instructions
Reading || ################################################## || 100% 0.02s
avrdude: Device signature = 0x1e9404
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "firmware_1.07.hex"
avrdude: input file firmware_1.07.hex auto detected as Intel Hex
avrdude: writing flash (5178 bytes):
Writing || ################################################## || 100% 2.56s
avrdude: 5178 bytes of flash written
avrdude: verifying flash memory against firmware_1.07.hex:
avrdude: load data flash data from input file firmware_1.07.hex:
avrdude: input file firmware_1.07.hex auto detected as Intel Hex
avrdude: input file firmware_1.07.hex contains 5178 bytes
avrdude: reading on-chip flash data:
Reading || ################################################## || 100% 2.25s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x0c ! 0xff
avrdude: verification error; content mismatch
avrdude: safemode: lfuse changed! Was 62, and is now ff
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: hfuse changed! Was 99, and is now ff
Would you like this fuse to be changed back? [y/n] n
avrdude: safemode: Fuses OK
avrdude done. Thank you.
C:\Documents and Settings\eche027\Desktop\firm>
FAULTS
1)
SJA1000 Chip Select (pin4) needs grounding. Using a resistor or direct short to groud works (HW solution). SW solution preferred - output LOW Signal from Atmel PC.
2)
V1.07 has baud rate irregularity, see http://www.mictronics.de/projects/usb-can-bus/ user comments ~jan2011 -- Main.PhilipCourt - 2011-04-20
NOTES
Fuses:
http://www.engbedded.com/fusecalc/
Ebay device fuse settings: h,l,e 0xD1, 0xD0, 0xFB
Mictronics recommended 0xD0, 0xF7, 0xFB
Our fuse settings: 0xD9, 0xD0, 0xFB
CAN PINOUT
-- Main.PhilipCourt - 2011-06-29
JF2 Lata cables connect to CAT5 cables as follows:
- CANH to CAT5 pin1
- CANL to CAT5 pin 2