Is it possible to disable/float the transmit pin of the HW UART?
Essentially, I only want the PIC to listen to the RS232 bus but not be able to affect the current bus transmissions. (Obviously the easiest thing to do is just physically not connect the pin, but I am trying to implement a software solution!)
I tried the #use RS232(FLOAT_HIGH, ....) option but that does not work with the HW UART.
Ttelmah
Joined: 11 Mar 2010 Posts: 19505
Posted: Mon Oct 29, 2012 2:03 am
The solution has been posted here before.
What you do is enable the hardware UART 'as normal', then add to your code:
Code:
#bit TXEN=getenv("BIT:TXEN")
//Then just
TXEN=FALSE;
//will turn off just the transmit side of the UART
You can then use the pin as normal.
The compiler won't actually add the transmit 'code' to your software unless you perform a putc (or something else that uses this like printf), so the overhead is tiny.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum