2
#include <p18f45k22.h>
#include <usart.h>

char uart_rd;

void main(void)
{

ANSELC = 0;

Open1USART(USART_TX_INT_ON &             // disables transmission interrupt     
           USART_RX_INT_OFF &// disables reception interrupt                            
           USART_ASYNCH_MODE & // sets USART to asynchronous mode  
           USART_EIGHT_BIT&  // sets USART to use 8-bit data mode 
           USART_CONT_RX &   // sets the port in continues receive mode 
           USART_BRGH_HIGH,   // uses the low speed Baud rate formula 
          52 // sets Baud to 9600 BPS using 8MHz in calculation (actual baud rate is 9600.614)
            );  

while (1) 
{ 
putrs1USART ("Hello world!\n"); 
} 

} 

ハイパーターミナルで何も取得できません。コードに何かを追加または削除する必要がありますか?

助けていただければ幸いです。

乾杯

4

0 に答える 0