单片机avr写了一个关于PWM波的程序但是有些错误求大神帮忙找找 10
Interrup[12]voiduart_rx_func(void){UART_Transmit(~UDR);}Main(){unsignedcharuchData;UC...
Interrup [12] void uart_rx_func(void){
UART_Transmit(~UDR);
}
Main(){
unsigned char uchData;
UCSRB = 0x98; UCSRC = 0xbe; UBRRL = 25;
TCCR0 = 0x7c;
#asm(“sei”)
while(1)
{
if(0xff != PINA)
{
delay_ms(20);
if(0 == PINA.0)
OCR0 -= 50;
else
OCR0 += 50;
}
}
} 展开
UART_Transmit(~UDR);
}
Main(){
unsigned char uchData;
UCSRB = 0x98; UCSRC = 0xbe; UBRRL = 25;
TCCR0 = 0x7c;
#asm(“sei”)
while(1)
{
if(0xff != PINA)
{
delay_ms(20);
if(0 == PINA.0)
OCR0 -= 50;
else
OCR0 += 50;
}
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询