atmega16单片机C语言程序(2)
发布时间:2021-06-08
发布时间:2021-06-08
}
}
// Declare your global variables here
void main(void)
{
PORTD=0x08;
DDRD=0x20;
TCCR1A=0x40;
TCCR1B=0x08;
TCNT1 = 0x00;
ICR1H = 0x00;
ICR1L = 0x00;
OCR1A = 0x00;
OCR1B = 0x00;
// Timer(s)/Counter(s) Interrupt(s) initialization TIMSK=0x10;
GICR|=0x80;
MCUCR=0x08;
MCUCSR=0x00;
GIFR=0x80;
// Global enable interrupts
#asm("sei")
while (1)
{
}
}
上一篇:公积金提取