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

5V PIC & 3.3V GPS

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








5V PIC & 3.3V GPS
PostPosted: Fri Jun 19, 2009 3:34 pm     Reply with quote

Hi All,

Will a PIC 16F628 running at 5V reliably receive data from a GPS module running at 3.3V if the Tx output of the GPS is only guaranteed to swing to 2.85V? The GPS will be connected to the hardware Rx input on the PIC. I looked for this info in the datasheet, but didn't see any threshold level specs. in the UART section.

Chad
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jun 19, 2009 5:37 pm     Reply with quote

First look in this table in the 16F628 data sheet, and see the type of input
pin that's used for the Rx pin on the hardware UART. It's called "ST" which
means Schmitt Trigger.
Quote:
TABLE 2-1: PIC16F62X PINOUT DESCRIPTION


Then look in the Electrical Section (in section 17.2) to see the Vih
voltage for a Schmitt Trigger input. It's 0.8 * Vdd. For a Vdd of 5v,
that's 4.0 volts minimum high level voltage required.

So you need a level converter. One way to do this is to use a logic
gate that has TTL input levels, and CMOS output levels. One logic
family that does this is the HCT family. You could use any non-inverting
gate or buffer to do this. For example, a 74HCT125 buffer would work.
Just use one section and connect the \OE pin to ground. (I'm assuming
that you don't want an inversion. If you want to invert the Rx signal, then
a 74HCT04 would work). A single gate version of the 74HCT125 chip
might be available. I didn't check.

There are other solutions in the forum archives. Search for these words:
Quote:
level shifter

Set the search options to:
Quote:
Search for all terms.
Guest








PostPosted: Sat Jun 20, 2009 6:56 pm     Reply with quote

PCM,

Thanks for the info, and for the pointer to where in the datasheet this info is found!

It's kludgy, but I think I'll opt for a two transistor buffer/level shifter!

Thanks,

Chad
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