Hello forum. How can i disable RX pin ? I have found how to disable TX but not RX .. I`m trying to communicate half-duplex with a 7816 SIM CARD and my tought was to bound the RX/TX togheter and disable/enable them on the fly ..to get rid of echo. I`m running 18f14k50. Thank you very much
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
Posted: Fri Nov 22, 2013 7:43 am
setup_uart(FALSE);
Disables the UART.
setup_UART(TRUE);
Turns it back on, with the existing baud rate.
Best Wishes
pulurumbuluruciu
Joined: 06 Nov 2013 Posts: 27
Posted: Fri Nov 22, 2013 12:02 pm
hah Ttelmah , is no good to disable both TX/RX . how I am gonna transmit if i disable both ?
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
Posted: Fri Nov 22, 2013 12:17 pm
Why do you need to disable the RX pin? It is a Hi-Z input that should not load the TX significantly. Just flush the RX buffer after a TX. _________________ The search for better is endless. Instead simply find very good and get the job done.
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
Posted: Fri Nov 22, 2013 12:26 pm
if you use #INT_RDA and modify the INT handler , you can use a bit flag
to prevent received chars from being added to the buffer.
simply use the standard CCS functions to read the state of the RX pin.
problem solved
pulurumbuluruciu
Joined: 06 Nov 2013 Posts: 27
Posted: Fri Nov 22, 2013 4:09 pm
Thank you all very much for your inputs. I will make some tests and hopefully chose the best solution.
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