AVR Drivers: Difference between revisions

Jump to navigation Jump to search
No edit summary
(add picture of Atmel and tables of pin numbers)
Line 9: Line 9:
Of course you will need a driver first. There are several NANJG drivers available that include an ATMEL TINY13A chip that can be programmed. These chips can also be locked down so they can't be changed, but so far none seem to be. However, some variants of NANJG drivers use a PIC chip that can not be programmed with AVR tools. See [[Popular drivers]] to see some of the drivers people have been using. Most of these use current regulators to limit the current delivered to the LED while the Atmel chip itself turns the power on and off very quickly, leaving it on for full power, or flashing on and off quickly to simulate a lower mode. By slowing the flashing more, you get strobe modes or SOS modes.
Of course you will need a driver first. There are several NANJG drivers available that include an ATMEL TINY13A chip that can be programmed. These chips can also be locked down so they can't be changed, but so far none seem to be. However, some variants of NANJG drivers use a PIC chip that can not be programmed with AVR tools. See [[Popular drivers]] to see some of the drivers people have been using. Most of these use current regulators to limit the current delivered to the LED while the Atmel chip itself turns the power on and off very quickly, leaving it on for full power, or flashing on and off quickly to simulate a lower mode. By slowing the flashing more, you get strobe modes or SOS modes.


The Atmel ATTiny13 has flash memory that can be written several thousand times. There are also settings called "fuses" which can be set or cleared.  
The Atmel ATTiny13 has an 8-bit processor with 1 kb of flash memory, 64 bits of RAM, and 64 bits of EEPROM that can be written several thousand times. There are also settings called "fuses" which can be set or cleared.  


===Hardware===
===Hardware===
Line 43: Line 43:


===Set up your clip===
===Set up your clip===
Match the pins of the Atmel chip with the pins of the USB programmer.
Match the pins of the Atmel chip with the pins of the USB programmer. Only pins 1, 5, 6, and 7 of the Atmel are used by the ISP programmer.
 
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.]]
 
 
{|class="wikitable" style="text-align: center; width: 400px;"
|+ ATMEL ATTiny13A pins
|-
| 8 VCC  ||  '''7 SCK'''  || '''6 MISO''' ||  '''5 MOSI'''
|-
| '''1 RST'''  ||  2 INP  ||  3 INP || 4 GND
|}
 
The programmer is 10 pins however which are set up this way:
 
{|class="wikitable" style="text-align: center; width: 400px;"
|+ AVR Programmer ribbon wires
|-
!Pin  !!    Function  !!  Function  !!  Pin   
|-
|1  ||  MOSI  ||  VCC  || 2   
|-
|3  ||  NC    ||  GND  || 4   
|-
|5  ||  RST  ||  GND  || 6   
|-
|7  ||  SCK  ||  GND  || 8       
|-
|9  ||  MISO  ||  GND  || 10 
|}
 
So Wire 1 (MOSI) of the ribbon cable from the programmer must attach to Pin 6 of the Atmel. Make sure you mark which end 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.


==Download settings==
==Download settings==