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

RS232 Levels

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



Joined: 28 Nov 2005
Posts: 17

View user's profile Send private message

RS232 Levels
PostPosted: Sat Dec 17, 2005 5:08 pm     Reply with quote

Hi,

Some electronics questions. I'm using a Garmin eTrex to interface with a PIC16F877, using the hardware UART, and it's corresponding RX pin.

1) The GPS provides 4V high, and a -3V(ish) low. If Vdd is 5V and the schmitt triggers require 0.8Vdd = 4Vto go high, why does connecting the serial out of the GPS directly to the PIC RX not work?

2) I've used a 2 resistors and a NPN transistor to interface the GPS to the PIC.
5V - R1 - UART RX
R1 - Collector
0V - Emitter
GPS Out - R2
R2 - Base
As I have the PIC input connected to the collector, it is actually low when the GPS is high. i.e inverted. I saw this method online and never gave it much thought. Why does this work?

These 2 questions may well be linked - i suppose if the GPS output is inverted this would explain both.

Thanks for any help.

Michael
UFAnders



Joined: 13 Apr 2005
Posts: 36
Location: Michigan

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

PostPosted: Sat Dec 17, 2005 5:16 pm     Reply with quote

I imagine that a self-contained handheld module like the eTrex has standard (inverted) serial I/O. The PIC's hardware UART is TRUE LEVEL (not inverted) serial I/O. Perhaps this answers your question? Smile
michaelb



Joined: 28 Nov 2005
Posts: 17

View user's profile Send private message

PostPosted: Sat Dec 17, 2005 5:29 pm     Reply with quote

Excellent - thanks for that. Didn't realize that standard was inverted. It all becomes clear now.

Thanks again,

Michael
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