UART

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UART

736 Views
alvarolopes
Contributor III

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.

Labels (1)
0 Kudos
3 Replies

554 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

554 Views
alvarolopes
Contributor III
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!

0 Kudos

554 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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.

pastedImage_1.png

    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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos