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

Holding Usart output low

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



Joined: 27 Dec 2004
Posts: 21

View user's profile Send private message

Holding Usart output low
PostPosted: Fri Apr 08, 2005 12:06 am     Reply with quote

So, This is one that I cannot find the answer to: I am using the Usart to drive wireless data transmission. The tansmission only occures in very short bursts every 30 seconds. What I am trying to do is turn off the usart output and pull the output low between transmission. This is because TTL serial has the output remaining high when idle.
to do this I am using:

Code:
TXEN=0; //to turn off the Usart output, and
output_low(pin_c6);// to force the ouput low untill I turn it back on for the next transmission.


the problem is that this is not working. Output remains high.
by the way this is an PIC16F876.
the datasheet block diagram for port C peipheral pins shows that the output enable of the peripheral is the only thing that switches the pin's mode. So then shouldn't disableing the transmit on the Usart return control to the TRIS and PORT registers?

Any ideas?
thanks as always to the community!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 08, 2005 12:30 am     Reply with quote

Your assumption is that disabling TXEN will turn pin C6 back into an i/o pin.
That function is actually done by the SPEN bit in the RCSTA register.
jmann



Joined: 27 Dec 2004
Posts: 21

View user's profile Send private message

PostPosted: Fri Apr 08, 2005 12:39 am     Reply with quote

Though it is not a problem for the transmitter in this project, SPEN=0 would turn off the reciever too.
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Fri Apr 08, 2005 7:31 am     Reply with quote

I am curious, what is wrong with the TX pin sitting at logic 1? That is the customary TTL serial line idle state.

Do you want to power down the RF module and the input protection diodes are keeping it running?
_________________
The search for better is endless. Instead simply find very good and get the job done.
Ttelmah
Guest







PostPosted: Fri Apr 08, 2005 8:59 am     Reply with quote

You don't say what IO mode you are running in?. I'd try setting C6 low, and also setting the corresponding TRIS bit to '0'.

Best Wishes
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