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.

Tiny AVR Microcontroller Runs on a Fruit Battery

Step 6Program the AVR Tiny Microcontroller

Program the AVR Tiny Microcontroller
The AVR is programmed using STK500 in High Voltage Serial Programming (HVSP) mode. The fuse settings are as shown here. The C code is short and sweet:

#include<avr/io.h>

volatile uint8_t i=0;
int main(void)
{

DDRB=0b00001000;
PORTB=0b00000000;

while(1)
{
PORTB=0b00000000;
for(i=0;i<254;i++);
PORTB=0b00001000;
for(i=0;i<254;i++);
}
return 0;
}
« Previous StepDownload PDFView All StepsNext Step »
1 comment
Aug 29, 2008. 1:24 PMMaarek says:
I was wondering why you used HVSP to program this with the STK500 and not using the SPI (SCK, MISO, MOSI) on PB0-2?

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!
33
Followers
9
Author:Gadre