#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
ISR(TIMER2_COMP_vect){
}
int main(void)
{
DDRA=0XFF;
SREG=0X80;
TIMSK=0X80;
TCCR2=0X07;
TCNT2=0X00;
while(1);
{
_delay_ms(500);
}
}
#include <util/delay.h>
#include <avr/interrupt.h>
ISR(TIMER2_COMP_vect){
TIFR|=0X80;
PORTA=0XFF;
_delay_ms(500);
PORTA=0X00;
}
int main(void)
{
DDRA=0XFF;
SREG=0X80;
TIMSK=0X80;
TCCR2=0X07;
TCNT2=0X00;
while(1);
{
_delay_ms(500);
}
}
No comments:
Post a Comment