CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Disable RX pin

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
pulurumbuluruciu



Joined: 06 Nov 2013
Posts: 27

View user's profile Send private message

Disable RX pin
PostPosted: Fri Nov 22, 2013 5:39 am     Reply with quote

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: 19545

View user's profile Send private message

PostPosted: Fri Nov 22, 2013 7:43 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Nov 22, 2013 12:02 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Nov 22, 2013 12:17 pm     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Fri Nov 22, 2013 12:26 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Nov 22, 2013 4:09 pm     Reply with quote

Thank you all very much for your inputs. I will make some tests and hopefully chose the best solution.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group