cancel
Showing results for 
Search instead for 
Did you mean: 

After UART send the bytes from the buffer, \0 is also received.

RPG
Senior

Why I get \0 at the end of the transmission?

I imaging the \0 is a NUL termination character but I have seen from the terminal that sometimes is not received or arrives with a big delay.

Could somebody tell me anything about it?

Thanks in advance.

25 REPLIES 25

Thank you Piranha. This made it work. I have learnt A lot fro this issue.

I changed the TX pin to pull-up and now is working fine.

"you need to understand why the original code disabled the transmitter"

Indeed.

RS422 was mentioned in one of the code comments above - perhaps it's to do with that/

Or, perhaps, RS485 was meant - that would definitely require disabling the transmitter when idle ... ?

RS422 is being used on this project.

Thanks for the support :)

Is it being used half-duplex, so that the transmitter needs to be disabled when idle?

Don't think so, but I will investigate.

Actually, RS422 is Multidrop anyhow - so would definitely need transmitter disabling:

https://www.omega.co.uk/techref/das/rs-232-422-485.html