3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.


USB PCB Business Card

Step 8Programming the AVR

You need to download the code provided here.

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 StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
177
Followers
12
Author:frank26080115(Frank's Projects)
I'm an electrical engineering student at the University of Waterloo.