5V to 3.3V communication


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219

    Default 5V to 3.3V communication

    I’m trying to use SHIFTIN between a 16f1936 at 5V and a 3.3V MAX31855 T-type TC to digital converter.

    Question: What is the most common method for communication interface of a 5V device with a 3.3V device? There are three lines between the PIC and the converter. I didn't think about the problem until I could not communicate with two MAX31655 which means I may have smoked 'em.

    Select 5V from PIC needs to be 3.3V I think
    CLK 5V from PIC needs to be 3.3V I think
    Data 3.3V from MAX should be OK

    The PIC drives the Select line from high to low enabling the converter serial output. The PIC supplies the clock and the converter drives the data line as communication is only one way from the converter to the PIC. Will a 1k ohm resistor in the CLK line create any problems? Will a 1k ohm resistor in the Select line cause any problems? The Data line is being driven by the 3.3V converter and should not have any problems, PIC should be able to read 3.3V and lose no data.
    Comments please!

    Wayne

  2. #2
    Join Date
    Aug 2011
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: 5V to 3.3V communication

    Select 5V from PIC needs to be 3.3V I think
    CLK 5V from PIC needs to be 3.3V I think
    Yup. You should use more than just a series 1K resistor, though.
    You could use a voltage divider on the 5V PIC outputs...say 2K series/3K shunt to gnd. That should work ok at slow speeds.
    You could also use a pullup resistor to 3.3V and drive the outputs as open-drain, but that's not compatible with SHIFTIN.

    Data 3.3V from MAX should be OK
    For the input pin be sure to pick a pin that has TTL level inputs (PORTA and PORTB) and not ST levels, otherwise the 3.3V output from the MAX won't meet the input Vih spec.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: 5V to 3.3V communication

    Hi,
    There are bidirectional level shifter ICs available and you can do it with small MOSFETs and such but for a one-off I'd just use a voltage divider on the 5V to 3.3V signal and nothing on the 3.3V to 5V signal. (Doing that right now in my desk (PIC is 3.3V, device is 5V).

    The MAX31855 logic high is min Vcc-0.4 so if you run it at 3.3V it'll put out 2.9V which is well above the 2.0V threshold of the PIC if you run that at 5V and using a non Schmitt trigger input...

    /Henrik.

  4. #4
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: 5V to 3.3V communication

    Thanks guys,
    I will take that and run with it. I think I'll bread board with the 2k/3k then look at a level shifter IC's' on the finial board work.
    Thanks again!
    Wayne

  5. #5
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67


    Did you find this post helpful? Yes | No

    Default Re: 5V to 3.3V communication

    Check out at Adafruit's breakout board. They have a nice solution: https://github.com/adafruit/Adafruit...breakout-board

    Why not powering your PIC with 3.3V? That saves a lot of trouble.

    Name:  Adafruit-MAX31855.png
Views: 576
Size:  22.0 KB

  6. #6
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: 5V to 3.3V communication

    Rather than buying expensive chips why not make your own with this app note:
    Attached Images Attached Images
    Dave Purola,
    N8NTA
    EN82fn

  7. #7
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67


    Did you find this post helpful? Yes | No

    Default Re: 5V to 3.3V communication

    Quote Originally Posted by Dave View Post
    Rather than buying expensive chips why not make your own with this app note:
    The Adafruit board is quite pricey but look how they did the level shifting. I did use this trick with an ESP8266, worked fine.

Similar Threads

  1. icd communication
    By jcleaver in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th July 2008, 15:36
  2. Wireless communication
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 17th April 2008, 18:21
  3. GPRS communication
    By Ioannis in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 9th April 2008, 20:02
  4. Help with 2 way communication
    By jessey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd April 2007, 09:11
  5. 18F458 to PC communication Help
    By shawn in forum Serial
    Replies: 4
    Last Post: - 11th February 2007, 19:24

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts