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 support@ccsinfo.com

HW USART TX Level

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



Joined: 13 Jan 2006
Posts: 5
Location: Italy

View user's profile Send private message

HW USART TX Level
PostPosted: Fri Jan 13, 2006 2:53 am     Reply with quote

I guys,

I have a problem related to the idle state of tx ( RC6 ) PIN when in RX mode.

I need to drive a serial external module that requires TX Line at LOW Level when PIC is waiting for an incoming streaming.

Looking at scope and also on the Registers I found that with #RS232 directive TRIC.6 = 0 and TRISC.7 = 1.
Moreover LATC.6 = 1 and LATC.6 = 1.

I'm not able to test fw modification now but my question is really simple:

"Do you think that simple having in the code the bit_clear( LATC, 6 ) when in RX I can solve my problem ? "

"Or can you suggest a more elegant way to reach my target ?"

Some details:
PIC18F2420 @40Mhz
CCS PCH 3.242

Thank you very much for your help

Paolo
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Jan 13, 2006 3:12 am     Reply with quote

Driving TX TTL level low on idle is not the protocol behaviour for RS232. It sounds like the external module is expecting Rs232 line driver input level behaviour. Can you post a link to the module?
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Scanny



Joined: 13 Jan 2006
Posts: 5
Location: Italy

View user's profile Send private message

PostPosted: Fri Jan 13, 2006 3:26 am     Reply with quote

Module is AUREL XTR-869.
Is a radio module.

In the datasheet you'll don't find anything about the TX LOW line.
This suggestion comes directly from AUREL technicians.

Paolo
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Fri Jan 13, 2006 8:16 am     Reply with quote

Quote:

"Do you think that simple having in the code the bit_clear( LATC, 6 ) when in RX I can solve my problem ? "

No. The iddle Tx state must be High as asmallri stated.

Quote:

"Or can you suggest a more elegant way to reach my target ?"


Not an elegant way but you have two choices:
1) Use software UART wich as the INVERT capability.
2) Use a hardware inverter like a transistor or a logic gate inverter between the Tx output and the RF module.

Humberto
Scanny



Joined: 13 Jan 2006
Posts: 5
Location: Italy

View user's profile Send private message

PostPosted: Fri Jan 13, 2006 8:23 am     Reply with quote

Dear Humberto,

I need to look into INVERTED Mode. I don't know what this does mean but I can simple imagine the behaviour.

Of course I considered a simple NPN transistor + a collector resistor in order to have a logical inverter but I cannot follow this way because the hardare ( schematics plus pcbs ) are already done !

I will try your suggestion today.

I will back on the forum with results.

Thanks a lot
Paolo
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Fri Jan 13, 2006 8:35 am     Reply with quote

Quote:

I need to look into INVERTED Mode. I don't know what this does mean but I can simple imagine the behaviour.


Read this:
http://www.ccsinfo.com/forum/viewtopic.php?t=24807&highlight=invert

molto salutti,

Humberto
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