2019-03-24 20:29发布
hnjylijunz 发表于 2014-4-21 00:04 # include # define uint unsigned int # define uchar unsigned char
最多设置5个标签!
# define uint unsigned int
# define uchar unsigned char
void time0_ctc_init(void)
{
/*8分频 CTC模式 比较匹配时取反*/
TCCR0|=(1<<CS01)|(1<<WGM01)|(1<<COM00);
OCR0=250;
}
void main(void)
{
time0_ctc_init();
DDRB|=(1<<PB3);
PORTB|=(1<<PB3);
while(1)
{
}
}
/*
ATME16我写的定时器0 CTC模式,你参考一下啊
*/
多谢了
一周热门 更多>