Difference between revisions of "Program the Daughter Board"
(Created page with "The Dragino MS12 provides SPI and UART interface which can be used to connected to the daugther board. we can use them to program the daugther board. Different type of MCUs may h...") |
(→for Flukso Sensor Board) |
||
Line 4: | Line 4: | ||
Avrdude is programing via SPI interface, so you need to make sure that your AVR's SPI interface is connecting to the MS12. If you have question of how to connect, please refer our hardware design guide. | Avrdude is programing via SPI interface, so you need to make sure that your AVR's SPI interface is connecting to the MS12. If you have question of how to connect, please refer our hardware design guide. | ||
− | == | + | ==Flukso Sensor Board v2.1== |
+ | Program the Flukso sensor board. The MCU of Flukso sensor board v2.1 is atmega168p. | ||
+ | 1/ Compile the .hex and .epp according to the instruction in [https://github.com/icarus75/flukso/tree/develop/mote/v2/avr Flukso sensor board source code] | ||
+ | |||
+ | 2/ Plug the Flukso sensor board into the Dragino MS12. | ||
+ | |||
+ | 3/ Connect the Dragino LAN port to your computer. | ||
+ | |||
+ | 4/ Set the ip address of your computer to 192.168.255.2/24 | ||
+ | |||
+ | 5/ power up the Dragino MS12 | ||
+ | |||
+ | 6/ transfer the files .hex and .epp to the MS12 by running | ||
+ | scp main.hex main.eep root@192.168.255.1:/tmp | ||
+ | |||
+ | 7/ in MS12, runs | ||
+ | cd /tmp | ||
+ | fdude -p atmega168p -c gpio -U lfuse:w:0xEC:m -U hfuse:w:0xD6:m -U efuse:w:0x01:m -U flash:w:main.hex -U eeprom:w:main.eep | ||
+ | |||
+ | step 6&7 are combined into a single command in the Flukso avr directory. You just need to run | ||
+ | make rprogram | ||
+ | to have 6 & 7 autorun. |
Revision as of 03:42, 13 April 2011
The Dragino MS12 provides SPI and UART interface which can be used to connected to the daugther board. we can use them to program the daugther board. Different type of MCUs may have different methods. below are some examples:
Program AVRs via avrdude
Avrdude is programing via SPI interface, so you need to make sure that your AVR's SPI interface is connecting to the MS12. If you have question of how to connect, please refer our hardware design guide.
Flukso Sensor Board v2.1
Program the Flukso sensor board. The MCU of Flukso sensor board v2.1 is atmega168p. 1/ Compile the .hex and .epp according to the instruction in Flukso sensor board source code
2/ Plug the Flukso sensor board into the Dragino MS12.
3/ Connect the Dragino LAN port to your computer.
4/ Set the ip address of your computer to 192.168.255.2/24
5/ power up the Dragino MS12
6/ transfer the files .hex and .epp to the MS12 by running
scp main.hex main.eep root@192.168.255.1:/tmp
7/ in MS12, runs
cd /tmp fdude -p atmega168p -c gpio -U lfuse:w:0xEC:m -U hfuse:w:0xD6:m -U efuse:w:0x01:m -U flash:w:main.hex -U eeprom:w:main.eep
step 6&7 are combined into a single command in the Flukso avr directory. You just need to run
make rprogram
to have 6 & 7 autorun.