Step 8Programming the AVR
Open up the file "main.c" and find the place where the string is stored, look for the function "puts_P". You need to edit this string before compiling (or else it will print my text instead of yours). You'll notice that the string is stored in flash memory, and if you compile a longer string, the size of the flash compilation increases. Please be advised that you cannot exceed the memory capacity of the ATtiny85, which is 8KB of flash memory.
After editing the string, compile the code. The ".avrproj" file is a file format that can be opened by AVR Project IDE (a IDE I made for myself), which makes compiling the project very easy.
A hex file is generated and you can write the hex file into the AVR. You need an AVR programmer of some kind, and connected to the business card as shown in the schematic below. Remember to connect those hidden connections!
Also please note that the programmer must be set to use a low speed due to the 68 ohm resistors on the D+ and D- signals. This means the AVRDUDE option "-i <delay>" must be included, so the command looks something like: "avrdude -c programmer_name -p attny85 -i 100 -U flash:w:file_name.hex"
How do you connect the programmer? First take a look at the schematic:

I made a not-so-neat looking programming adapter using a USB port, a AVR ISP connector, and some wire:

Here it is, connected to my USBtinyISP:

This is what the card looks like while being programmed:
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|












































