A lot of information can be found on the internet about programming an AVR (Atmel) microcontroller like the attiny2313A. The problem for starters is normally ‘where to start and I need a programmer’.
Yes, you need a programmer to program a microcontroller. With this, I mean loading an existing program in the microcontroller. Making a program yourself is out of the scope for this article, since most starters just want to use an existing program.
Via AliExpress, I bought an USB-ISP programmer and a ZIF socket. With some pinheaders and male-female wires, It does the job for about 3 euro’s.
Then we need the software, it consists of the USBASP driver and the ProgISP program. Please check this website for more information.
(Note: you might want to try the ProgISP program first without installing the driver, you might not need the driver. The ProgISP program does not need to be installed, just copy it to a convenient folder.)
Now connect the wires correctly. For the Attiny2313A:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
ATTiny2313A USB Programmer ----------- -------------- Pin 1 Reset Pin 5 Pin 10 GND Pin 10 Pin 17 MOSI Pin 1 Pin 18 MISI Pin 9 Pin 19 SCK Pin 7 Pin 20 VCC Pin 2 |
Note that before programming the microcontroller, the fuses have to be set correctly, the program data (.hex) and eeprom data (.eep) have to be loaded!