Question on 3v to 5v SPI


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    BertMan's Avatar
    BertMan Guest

    Default Question on 3v to 5v SPI

    What is the best way to interface a 5v spi interface with a 3v interface? Is there a way to use an opamp for this? The 3v device will only tolerate up to 4.1v so I need to drop the voltage while preserving the digital signal.
    Last edited by BertMan; - 9th October 2005 at 05:37.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    voltage divider with few cents resistor... not much, Let's say a 3.9K from the PIC to the SPI device pin and a 1K resistor between this last pin and GND.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    I found a good combination (1500 and 1000 ohms) that would produce 3.0 volts at 2mA. Now how about the step up from 3 to 5v? If I could come up with the correct bias, I could use a standard transistor because I have a 5v tap in my circuit. But would it switch fast enough in this application?

  4. #4
    Join Date
    Aug 2005
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Why not just run the Pic at 3Volts I have done this with a few different Pics that needed to talk to 3.3V memory chips.
    In the spec sheets it does show that you should run at a lower Osc speed at 3.3v but I have always got away with still using a 20mhz Xtal.

    Regards

    Sean.

  5. #5
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    Yes the pic will run at 3v but I have a math coprocessor that simply refuses to work at any voltage below 5v. The easiest thing is to keep the 5v logic for the pic and the cocpu and convert to 3v for the 3v device compass. I am going to try voltage dividers for the step down (output, and clock) and a standard NPN transistor with the base connected to the output of the compass(with bias resistor), the emitter connected to the pic, and the collector connected to +5V for the step up input. In case you cant tell, I am new to digital circuits, but do I have some experience with analog designs. Would this setup allow 5v to 3v communications?
    Last edited by BertMan; - 10th October 2005 at 17:38.

  6. #6
    Join Date
    Aug 2005
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Ah I see what you mean, so the Pic must be at 5volts.

    What about a buffer chip such as 74LVC07A running at 3volts?

    http://www.semiconductors.philips.com/pip/74LVC07A.html

    Dunno if this will be fast enough depending what speed you are clocking the data in and out at.

    Should think the Pic will be happy with 3volts as a input to show a high and your concern is just isolating the 5volts going back to 3v part.

    Regards

    Sean.

Similar Threads

  1. Using SPI with External Interrupts
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th June 2008, 04:08
  2. 16-bit SPI problem
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th June 2008, 15:42
  3. 1.5 v to 3v and 5v? Really confused.
    By kevj in forum Schematics
    Replies: 6
    Last Post: - 17th October 2007, 14:16
  4. 5v and 7v on same board - question
    By mark.oswald in forum Schematics
    Replies: 1
    Last Post: - 28th July 2007, 23:03
  5. How to configure SPI in PICBASIC PRO?
    By moogle in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 15th April 2007, 18:31

Members who have read this thread : 0

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