forked from lincomatic/AT90CAN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
49 lines (32 loc) · 1.79 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
AT90CAN Support for Arduino
Maintainer: Sam C. Lin <[email protected]>
This is a continuation of SuperCow's work on adapting Arduino to work with AT90CANxx MCU's at http://arduino.cc/forum/index.php/topic,8446.0.html
Compile Arduino sketches on Atmel AT90CANxx MCU's.
Supports USBtinyISP and JTAG ICE mk1
For Arduino <= 0023: copy the 0023/at90can folder to <arduino>/hardware/at90can
For Arduino >= 1.0: copy the 1.0/at90can folder to <arduino>/hardware/at90can
From the Arduino IDE's Tools->Board menu, select either
[usbtinyisp]AT90CAN128
or
[JTAG ICE mk1]AT90CAN128
Set your fuses with avrdude:
avrdude -c usbtiny -p at90can128 -U lfuse:w:0xFF:m
avrdude -c usbtiny -p at90can128 -U hfuse:w:0x19:m
avrdude -c usbtiny -p at90can128 -U efuse:w:0xFF:m
To install bootloader for programming over serial, you must set in hfuse BOOTSZ=10 and BOOTRST=0. Use the following fuse settings:
avrdude -c usbtiny -p at90can128 -U lfuse:w:0xFF:m
avrdude -c usbtiny -p at90can128 -U hfuse:w:0x1C:m
avrdude -c usbtiny -p at90can128 -U efuse:w:0xFF:m
You will also need to set up the automatic reset circuit to use DTR to toggle the RESET pin: DTR---|100nF|--<RESET>--|1n4148>|--VCC
Select [bootloader]AT90CAN128 board type in Arduino IDE and burn the bootloader.
Thereafter, you can burn sketches without a hardware programmer via USART0 (RXD0/TXD0) by selecting board type [bootloader]AT90CAN128.
For Arduino pin mappings, see AT90CAN_Pinmap.txt
For more information, see http://blog.lincomatic.com/?tag=can-bus
----------------
ChangeLog
20130421 SCL
- restore missing usbtinyisp to 1.0 boards.txt
20130104 SCL
- get bootloader working. Thanks to a4x4kiwi for help
- changed lock bits when locked from CF to 0F because even though AT90CAN128
datasheet shows top 2 bits fixed = 1, avrdude always reads back 0's.