No.11221 作者:huangxi205 邮件:huangxi205@163.com ID:5494 登陆:13次 QQ:46509028 文章数:114篇 最后登陆IP:218.19.137.159 最后登陆:2005/6/6 23:37:26 注册:2001/8/21 10:57:00 财富:520 发帖时间:2002/9/19 10:48:00 发贴者IP:218.20.2.131 标题:huangxi205:AVR单片机:晓奇,进来看看,好吗? 摘要:No.11221AVR单片机:晓奇,进来看看,好吗? 晓奇,帮我看看我下面的程序好吗?我知道你是高手,麻烦多多指教。怎么PC口输出的频 率只有24K对哦一点点?PD.7 输出间隔也不对,大概有五六十秒,请帮我看看我的程序错 在那里,非常多谢!!!!! /********************************************* Chip type : AT90S8535 Clock frequency : 4.000000 MHz Memory model : Small Internal SRAM size : 512 External SRAM size : 0 Data Stack size : 128 *********************************************/ #include <90s8535.h> #include <delay.h> // Timer 0 overflow interrupt service routine interrupt [TIM0_OVF] void timer0_ovf_isr(void) { // Reinitialize Timer's 0 value TCNT0=0xfc; PORTC=~PORTC; } // Declare your global variables here void main(void) { // Declare your local variables here // Input/Output Ports initialization // Port A PORTA=0x00; DDRA=0x00; // Port B PORTB=0x00; DDRB=0x00; // Port C PORTC=0x00; DDRC=0xFF; // Port D PORTD=0x00; DDRD=0x80; // Timer/Counter 0 initialization // Clock source: System Clock // Clock value: 4000.000 kHz // Mode: ......
>>返回讨论的主题
|