2014-03-20 08:25 AM
USART_SendData(USART1, 12);
USART_SendData(USART1, v_dc_int);
USART_SendData(USART1, v_dc_fra);
If I send only one of the it is received fine. But if I send them all, I only can see the last of them.
Do I have to do something between each byte sent to make sure it is received well? Like to wait for the register to be empty? If so, how do I do that?
2014-03-20 08:38 AM
Yes, like pretty much every USART ever, you have to check if it can take the byte you want to send.
while(USART_GetFlagStatus(USART1, USART_FLAG_TXE) == RESET); // Wait for Empty
USART_SendData(USART1, 0x49); // Send 'I'