#if disp_PA_EN == 1 PORTA |= 0xFF; asm("nop"); DDRA &= 0X00; asm("nop"); t = PORTA; USART_Transmit0(0xaa); USART_Transmit0(t); #endif 我想从PA读数然后从USART0通过232发回主机,看结果是否正确,端口的初始值是FF,串口接到的也是这个结果: AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF 我人为将部分A口接地后还是这个结果: AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF AA FF 请教我错在哪里,谢谢!!!!!!!!!!!! AVR新手. |