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

using level translators for 5v PIC with 3v I2C

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



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

using level translators for 5v PIC with 3v I2C
PostPosted: Wed Mar 26, 2014 6:45 pm     Reply with quote

has anybody had experience - willing to be shared- with mating 5V PICS with 3v I2C using the Philips PCA9509 ?
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Wed Mar 26, 2014 6:56 pm     Reply with quote

I have used 2n7000 FETs for years with no problems.
See this document:
http://www.adafruit.com/datasheets/an97055.pdf
_________________
Google and Forum Search are some of your best tools!!!!
temtronic



Joined: 01 Jul 2010
Posts: 9246
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Mar 26, 2014 7:20 pm     Reply with quote

Since there usually is a 3V version of most PICs, it's easier and cheaper to use the L series.
As well, some F series actually run fine at 3 volts, though maybe not at full speed.

hth
jay
languer



Joined: 09 Jan 2004
Posts: 144
Location: USA

View user's profile Send private message

PostPosted: Wed Mar 26, 2014 11:41 pm     Reply with quote

Along the same lines of what dyeatman showed;

https://www.sparkfun.com/products/12009

https://www.sparkfun.com/products/11955

I've implemented the FET solution on some of my designs a few times with no issues. Sometimes a simple series resistor suffices. But in some cases I have +5V sensors which need to interface to a +3.3V system.
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Thu Mar 27, 2014 1:18 am     Reply with quote

I've used the P82B96 for this. Both dealing with the 'odd' occasion of having to mix voltages on one board, and when sending I2C at higher voltages over long distances. The PCA9509, is very similar, but without the high current drive capability, and high voltage support.
Have to agree though that in general now for 5v PIC to 3.3v I2C, I'd start by seeing if it was possible to switch the whole board to 3.3v. Many of the 3.3v PIC's, are faster, use less power, and are often cheaper than there older brethren. PIC's like the 18F26J50, with dual I2C busses (second with DMA on SPI), dual UART'e etc., make using the older chips look rather pointless.

Best Wishes
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Thu Mar 27, 2014 7:14 am     Reply with quote

all points well taken. as with many projects i am offered , this is an update of an existing product that is legacy 5V - with a new requirement to add a specific feature- in this case a LIS3LV02DL from STM - and the simplest way i can see is to use a level translator with the new device on its own slightly remote pcb-for robustness and confidence in the alteration.

thanks to all for the commentary Very Happy Very Happy
temtronic



Joined: 01 Jul 2010
Posts: 9246
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Mar 27, 2014 7:38 am     Reply with quote

Yes, maintaining 'legacy' devices can be fun...I can see 2 more 'minor updates' before you have to redo the whole PCB...newer PIC, couple more bells, a whistle,just one more I/O pin...it never ends.

cheers
Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Thu Mar 27, 2014 9:11 am     Reply with quote

That makes total sense.

The translator chips are easy. Effectively two FET's, and the pull up resistors for the 3.3v part all in one package. VccB goes to your 5v. VccA to the 3.3v side. A connections to the 3.3v chip. B connections to the PIC (with external pull up resistors to 5v). EN pin pulled high.
The one I used, was specifically designed for really long interfaces, and really was as simple to use as anything.
Given the size of the surface mount part, it's a tidier solution than using the FET's, and has the advantage of better bus performance on the low voltage bus (active pull-ups rather than simple resistive). However the FET solution is cheaper if price is critical....

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