Home > other >  Serial print program run as proteus simulation serial TXD in but the serial assistants receive less
Serial print program run as proteus simulation serial TXD in but the serial assistants receive less

Time:12-02

PUTCHAR_PROTOTYPE
{
/* Place your implementation of fputc here */
/* e.g. Write a character to the USART */
USART_SendData (USART1, (uint8_t) ch);

/* Loop until the end of transmission */
While (USART_GetFlagStatus (USART1, USART_FLAG_TC)==RESET)
{}

return ch;
}

Void sendByte (u8 data)
{
USART_SendData (USART1, data);
While (USART_GetFlagStatus (USART1, USART_FLAG_TC)==RESET);
}


Void senddata publishes the event (u8 data [], u8 len)
{
u8 i;
for(i=0; i{
SendByte (data [I]);
Delay_ms (1);
}
}

CodePudding user response:

USART_SendData (USART1, data);
While (USART_GetFlagStatus (USART1, USART_FLAG_TC)==RESET);
Order change, or TC to TXE
If there is a problem and baud rate
  • Related