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

strange RS232 behaviour ?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Fri Mar 18, 2005 5:27 pm     Reply with quote

I can see from the brochure that his GPS has both a TTL capability and an RS232 capability which clears up my mystery of how he can run both with his GPS.
He is using the TTL option for a direct( without a max232) connection to the PIC. I don't have the 18LF2620 data sheet but you can bet with the PIC18LF2620 running at 3v it is not using standard TTL for its logic levels. The GPS is running at 5V and probably sending standard TTL logic levels.
Its likely the GPS tx pin is creeping over the PIC 3v supply rail when sending a logic 1 and creating the issues newby is having.
PS VOM was short for Volts Ohms meter I should have used DVM oops.
newby



Joined: 26 Sep 2004
Posts: 32

View user's profile Send private message

PostPosted: Sat Mar 19, 2005 2:11 am     Reply with quote

It�s getting confusing more and more.
I�m using now an stable 8 MHz oscillator and an MAX driver between PIC and GPS unit. GPS and PIC running at 5V.
The level on RC7 (RX-PIC) changes from 0 to 5 V which should be OK.

Unfortunately it is still only garbage revceived.
I connected the GPS to the SIOW and everything worked fine, i connected the PIC to the SIOW and again everything worked fine, but if i connect the GPS to the PIC, only garbage...

Does anybody know an example how to use the auto baud rate mode ?
Ttelmah
Guest







PostPosted: Sat Mar 19, 2005 3:27 am     Reply with quote

Obvious comment.
If the 'level changes from 0v to 5v', does this imply the signal is idling at 0v?. If so, then the signal is inverted. The idle state for a TTL serial signal, is high...

Best Wishes
newby



Joined: 26 Sep 2004
Posts: 32

View user's profile Send private message

PostPosted: Sat Mar 19, 2005 3:37 am     Reply with quote

...before the driver the GPS signal idles at 3 V and changes to 0 V. After the driver the signal idles at 0 V and changes to 5 V.

Is this a problem ?
Ttelmah
Guest







PostPosted: Sat Mar 19, 2005 3:39 am     Reply with quote

Yes.
Instead of using the Max driver, look for a non-inverting level shifter. If the signal is the wrong polarity at the processor, you will not be able to use the hardware UART, and with the hardware UART, garbage will be the only result...

Best Wishes
Guest








PostPosted: Sat Mar 19, 2005 7:17 am     Reply with quote

For a quick test it should be enough to use the options FORCE_SW and INVERT to check this out. I will try and report...
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Sat Mar 19, 2005 9:20 am     Reply with quote

I'm not clear what newby is doing (if anything) to get his GPS into RS232 mode when testing using the PC port and SIOW.
Telemath has a good chance of being right in thinking that the TTL the GPS puts out is just a 0-5v volt version of RS232 in which case it is inverted and the hardware USART can't be used. A max232 costs a buck or two plus it provides substantial ESD protection for both the GPS and the PIC and probably would have avoided all the issues.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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