I am using AVR studio 6.1 and the attiny45 isn't being programmed. Everything is set up. i've redone everything. the hook up from the ISP to the Attiny is ok. i have swapped the attimy 45 chip multiple times, so its not that.and i have a 4.7k pull up resistor on the reset line.
Here is my code:
#include <avr/io.h>
#include <avr/interrupt.h>
#include <inttypes.h>
#include <util/delay.h>
#define F_CPU 1000000UL
#define SERVO_DOWN 35
#define SERVO_UP 10
#define Outdoors 750
#define Indoors 600
int ReadADC();
int light = 0;
int main(void)
{
DDRB |= (1 << 0);
DDRB &= ~(1 << 4);
PORTB &= ~(1 << 4);
ADMUX |= (0 << REFS0);
ADMUX |= (1 << MUX1) | (0 << MUX0);
ADCSRA |= (1 << ADEN);
TCCR0A |= (1<<WGM01) | (1<<WGM00);
TCCR0A |= (1<<COM0A1);
TCCR0B |= (1<<CS01) | (1<<CS00);
while(1)
{
Test();
}
}
void Test() {
OCR0A = SERVO_DOWN;
_delay_ms(2000);
OCR0A = SERVO_UP;
_delay_ms(1000);
}
Please Help