Searching \ for '[PIC]: 5V PIC I/O to 3.3 VDC device' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=i%2Fo
Search entire site for: '5V PIC I/O to 3.3 VDC device'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: 5V PIC I/O to 3.3 VDC device'
2004\02\26@113036 by Bob Axtell

face picon face
Don't forget that there is a simple way to drive from a PIC at 5V to
a 3.3V peripheral. With PORT bit always low, just use the TRIS bit to
drive the output low, and use a pullup to 3.3V to set the level.

SOME 3.3V peripherals have input diode clamps that will clamp a 5V level
to 3.3V as long as a series resistor is used. I find that 470 to 1000
ohms always works. But... be sure to verify that the device HAS clamp
diodes heavy enough to handle the current (5V-3.3V/470) [362uA for 470
ohm] when the 5V is at a ONE state.

The other direction usually takes care of itself, if the impedance of
the signal is low enough.

--Bob
--

 Replies: NOTE-Script, EXE,BAT and COM
    files will be rejected by server
             --------------
               Bob Axtell
       PIC Hardware & Firmware Dev
         http://beam.to/baxtell
             1-520-219-2363

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\02\26@115601 by Alan B. Pearce

face picon face
>Don't forget that there is a simple way to drive from a
>PIC at 5V to a 3.3V peripheral. With PORT bit always low,
>just use the TRIS bit to drive the output low, and use
>a pullup to 3.3V to set the level.

Trouble is that the lines the OP wants to interface to 3.3V are the UART
lines, so he cannot use the TRIS trick.

As an afterthought, the OP should look at the Philips I2C interface doc
which has a section on doing exactly this on I2C lines.

See
http://www.semiconductors.philips.com/acrobat/literature/9398/39340011.pdf

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\02\26@121737 by Spehro Pefhany

picon face
At 04:55 PM 2/26/2004 +0000, you wrote:
> >Don't forget that there is a simple way to drive from a
> >PIC at 5V to a 3.3V peripheral. With PORT bit always low,
> >just use the TRIS bit to drive the output low, and use
> >a pullup to 3.3V to set the level.
>
>Trouble is that the lines the OP wants to interface to 3.3V are the UART
>lines, so he cannot use the TRIS trick.
>
>As an afterthought, the OP should look at the Philips I2C interface doc
>which has a section on doing exactly this on I2C lines.
>
>See
>http://www.semiconductors.philips.com/acrobat/literature/9398/39340011.pdf

That's a nice circuit. Just 2 pullup resistors and 2 2N700x transistors.
total for both directions.

Come to think of it, you could use BJTs too, with base resistors as thus:


                  3.3V  5V
                   o    o
                   |    |
                  .-.  .-.
              10K | |  | | 10K
                  | |  | |
                  '-'  '-'
                   |    |
                   |    |
                  ---   |
     0/3.3 in o---v \---+--o 0/5V out


            3.3v   5V
             o     o
             |     |
            .-.   .-.
        10K | |   | | 10K
            | |   | |
            '-'   '-'
             |     |
             |     |
             |    ---
           o-+----/ v-------o 0/5v in

    0/3.3v out


Only disadvantage I see is that it requires access to (and draws
current from) the 3.3V supply (or you could create a local 3.3V supply
from the 5V supply, but that would add at least one part.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
spam_OUTspeffTakeThisOuTspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\02\26@145043 by Brian Clewer

flavicon
face
Spehro wrote:

snip
>
> That's a nice circuit. Just 2 pullup resistors and 2 2N700x transistors.
> total for both directions.
>
> Come to think of it, you could use BJTs too, with base resistors as thus:
>
>
>                    3.3V  5V
>                     o    o
>                     |    |
>                    .-.  .-.
>                10K | |  | | 10K
>                    | |  | |
>                    '-'  '-'
>                     |    |
>                     |    |
>                    ---   |
>       0/3.3 in o---v \---+--o 0/5V out
>

Yes, would agree, very nice.


{Quote hidden}

This I disagree with.  I think the base of the transistor should also be at
3.3V for correct operation.  Otherwise the NPN transistor is working as if
the collector and the emitter were the wrong way around when +5v is applied
to the emitter.  The +5V in will go through the emitter and out of the
collector thus making the voltage on the collector 4+ volts.  Maybe not very
well explained, but try it on breadboard and you will see what I mean.

Brian.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\02\26@150911 by Spehro Pefhany

picon face
Corrected:



{Quote hidden}

Yes, you're absolutely right, of course. mea culpa.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam@spam@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\02\27@162415 by Peter L. Peres

picon face
The bipolar interface as shown has the disadvantage that it prevents
either side from powering off properly (and coming out of reset)
separately from the other. In my experience this turns out to be very
important. So using 2N7000s or LM339 (quad open collector comparators) or
bipolars as inverters (common emitter) is better for this. For low speed
the LM339 is almost the best choice imho. It also is un-fussy about supply
(up to 30V - see datasheet).

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...