#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
ISR(TIMER0_OVF_vect)
{
PORTA=0Xff;
_delay_ms(10000);
PORTA=0X00;
_delay_ms(1000);
TIFR|=0x01;
}
int main(void)
{
DDRA=0XFF;
SREG=0X80;
TIMSK=0x01;
TCCR0=0X05;
TCNT0=0X00;
//OCR0=0xff;
while(1);
}
#include <util/delay.h>
#include <avr/interrupt.h>
ISR(TIMER0_OVF_vect)
{
PORTA=0Xff;
_delay_ms(10000);
PORTA=0X00;
_delay_ms(1000);
TIFR|=0x01;
}
int main(void)
{
DDRA=0XFF;
SREG=0X80;
TIMSK=0x01;
TCCR0=0X05;
TCNT0=0X00;
//OCR0=0xff;
while(1);
}
No comments:
Post a Comment