AVR Drivers: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
[[File:Avrisp.jpg|thumb|200px|SOIC 8 clip attached to flashlight driver board for AVR ISP programming]]Some drivers have an Atmel microprocessor on board to control different modes. This microprocessor controls the number of modes, the brightness of the modes, the different flashing modes (strobe, SOS, etc.), mode memory, and low battery warnings. Atmel processors are programmable therefore the same driver can be loaded with different settings to customize the light with whatever features you want. This page will summarize some of the things you will need if you want to program your own drivers. This is based on a [http://budgetlightforum.cz.cc/node/799 Budget Light Forum discussion thread] where you can go for help or to get answers to your questions. This whole thing was started by a BLF member, Tido.
[[File:Avrisp.jpg|thumb|200px|SOIC 8 clip attached to flashlight driver board for AVR ISP programming]]Some drivers have an Atmel microprocessor on board to control different modes. This microprocessor controls the number of modes, the brightness of the modes, the different flashing modes (strobe, SOS, etc.), mode memory, and low battery warnings. Atmel processors are programmable therefore the same driver can be loaded with different settings to customize the light with whatever features you want. This page will summarize some of the things you will need if you want to program your own drivers. This is based on a [http://budgetlightforum.cz.cc/node/799 Budget Light Forum discussion thread] where you can go for help or to get answers to your questions. This whole thing was started by a BLF member, Tido.


All of this is based on AVR tools developed for Atmel chips, which is mostly open source (free). [http://en.wikipedia.org/wiki/Atmel_AVR Wikipedia article]. ISP means "In Sytem Programming," in other words, the chip can be reprogrammed while still soldered in place.
All of this is based on AVR tools developed for Atmel chips, which is mostly open source (free). [http://en.wikipedia.org/wiki/Atmel_AVR Wikipedia article]. ISP means "In System Programming," in other words, the chip can be reprogrammed while still soldered in place.


==Things You Will Need==
==Things You Will Need==
Line 53: Line 53:


The pins of the ATMEL chip are
The pins of the ATMEL chip are
[[File:Ak47pins.jpg|thumb|400px|Pin numbers of Atmel ATTiny13. Pin 1 has an indented circle and is marked with a triangle.]]  
[[File:Ak47pins.jpg|thumb|300px|Pin numbers of Atmel ATTiny13. Pin 1 has an indented circle and is marked with a triangle.]]  




Line 85: Line 85:
[[File:Ribbon.jpg|thumb|The ribbon port at the end is disassembled and wire 8 is moved over to the 9th position]]So Wire 1 (MOSI) of the ribbon cable from the programmer must attach to Pin 5 of the Atmel. Make sure you mark which side of the clip attaches to the top of the Atmel or everything will be misaligned next time you use it. Line up RST and SCK with their appropriate wires. But notice that MISO on the programmer is Wire number 9 and the ribbon only has 8 wires. You will need to disassemble the end of the ribbon cable at the controller end and move wire 8 over to the 9 position so that MISO lines up correctly.
[[File:Ribbon.jpg|thumb|The ribbon port at the end is disassembled and wire 8 is moved over to the 9th position]]So Wire 1 (MOSI) of the ribbon cable from the programmer must attach to Pin 5 of the Atmel. Make sure you mark which side of the clip attaches to the top of the Atmel or everything will be misaligned next time you use it. Line up RST and SCK with their appropriate wires. But notice that MISO on the programmer is Wire number 9 and the ribbon only has 8 wires. You will need to disassemble the end of the ribbon cable at the controller end and move wire 8 over to the 9 position so that MISO lines up correctly.


Communication with the Atmel chip is via Serial Peripheral Interface (SPI, see [http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus Wikipedia article]) with the ISP programmer a Master and the Atmel on the driver board a Slave. SCK is Serial Clock so they are in sync. The ISP programmer talks on the MOSI line (Master Ouput, Slave Input) while the Atmel talk back on the MISO (Master Input, Slave Output) line. RST is reset.
Communication with the Atmel chip is via Serial Peripheral Interface (SPI, see [http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus Wikipedia article]) with the ISP programmer a Master and the Atmel on the driver board a Slave. SCK is Serial Clock so they are in sync. The ISP programmer talks on the MOSI line (Master Ouput, Slave Input) while the Atmel talks back on the MISO (Master Input, Slave Output) line. RST is reset.


==Download settings==
==Download settings==
confirmed, developer
1,668

edits

Navigation menu