Boa Tarde!
Estou usando o LPC1768FBD100 e estou usando a UART1 para transmitir e receber bytes. Meu problema é:
Como saber se há algum bit, não o byte completo, sendo recebido pela serial. Digo isso para que eu possa evitar colisão na hora do envio de meus bytes em uma comunicação assíncrona.
Hello Alvaro Lopes,
Please rewrite your question in English, thank you!
Waiting for your English question.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Good afternoon! I am using LPC1768FBD100 and am using UART1 to transmit and receive bytes.
My problem is: How to know if there is a bit, not the complete byte, being received by the serial.
I say this so that I can avoid collision at the time of sending my bytes in an asynchronous communication.
Regards!
Hello Alvaro Lopes,
Thank you for your updated information.
If the frame is not complete, just as you have said, collision happen, if the stop bit should high, but the received bit still low, you will detect a frame error.
But, if your stop bit still the same, just the bit not what you want, you may need to check the received UART data, whether it is what you need, and operation it with the code function.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------