UART

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART

1,354件の閲覧回数
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.

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,172件の閲覧回数
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 件の賞賛
返信

1,172件の閲覧回数
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 件の賞賛
返信

1,172件の閲覧回数
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 件の賞賛
返信