How to configure RC6/TX to high impedance

Status
Not open for further replies.

VictorPS

Member
In PIC16F877A, I have configure hardware USART , how I configure the transmit pin (RC6/TX) to high impedance or logic '0'?
I have one master and multiple slave , so I need to put TX pin in tri-state when no transmission.
Thank you.
 
VictorPS said:
In PIC16F877A, I have configure hardware USART , how I configure the transmit pin (RC6/TX) to high impedance or logic '0'?
I have one master and multiple slave , so I need to put TX pin in tri-state when no transmission.
Thank you.

Set TRISC to make it an INPUT, you may also have to turn the USART OFF, or it may override the TRIS setting (the datasheet will explain if you have to or not).

BTW, 'master' and 'slave' are generally terms used for I2C, not RS232, so presumably you're wanting to use the USART in a non-standard fashion?.
 
Thanks, it work now , by setting TRISC is not enough, bit 5 (TXEN) of TXSTA must clear too.

BTW, 'master' and 'slave' are generally terms used for I2C, not RS232, so presumably you're wanting to use the USART in a non-standard fashion?.
Yes, my master-multislave is connect in non standard fashion, in original design, I am puting them in RS485 bus,
where the MAX485 will do the high impedance for me on Transmit line on the RS485 bus.
Since the PIC is putting close to each other, using MAX485/RS485 is a waste .
I also connect it to PC RS232 for monitoring purpose, so I don't use I2C.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…