gpio voltages
#1
What voltages can the GPIO pins handle as inputs?  Can they do 5v?
Can someone please provide a link to docs on voltage/milliamps on the gpio?
#2
(07-28-2017, 08:05 PM)ealbers Wrote: What voltages can the GPIO pins handle as inputs?  Can they do 5v?
Can someone please provide a link to docs on voltage/milliamps on the gpio?


Never touch more than 3v3 to any gpio pad ; ever !   (blue smoke, instant SoC failure)

Please see the SoC datasheet link provided.

Please see the SoC User Manual link provided.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#3
(07-29-2017, 08:56 AM)MarkHaysHarris777 Wrote:Never touch more than 3v3 to any gpio pad ; ever !   (blue smoke, instant SoC failure)

Please see the SoC datasheet link provided.

Please see the SoC User Manual link provided.

So say I have a ADC0832, its a 5V piece, it has a Digital out at 5V, whats the best way to read the output?  Resistor in series?  How big?

What about the inputs to the ADC0832, they register voltages over 2 volts as a 1, can I hook the outputs to the ADC0832's inputs??
Thanks!
#4
(07-29-2017, 07:02 PM)ealbers Wrote:
(07-29-2017, 08:56 AM)MarkHaysHarris777 Wrote:Never touch more than 3v3 to any gpio pad ; ever !   (blue smoke, instant SoC failure)

Please see the SoC datasheet link provided.

Please see the SoC User Manual link provided.

So say I have a ADC0832, its a 5V piece, it has a Digital out at 5V, whats the best way to read the output?  Resistor in series?  How big?

What about the inputs to the ADC0832, they register voltages over 2 volts as a 1, can I hook the outputs to the ADC0832's inputs??
Thanks!


The correct way to mix 5v and 3v3 logic is to use a level-shifter;  the one in the link is a four channel, but there are also larger ones-- the eight channel is popular.

Essentially the shifter-board has a high voltage reference, as well a low voltage reference.  One side of the board has the high voltage pins, and the other side of the board has the low voltage pins.  

It is ill advised to use a voltage divider resistor network, nor a resistor in series;  especially for ADC and DAC work.  Use proper level shifters always.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#5
Hm... that part is "TTL/MOS Input/Output Compatible"... it shouldn't be a problem, should it Marcus?

But yes, don't connect anything above 3.3v to the GPIO pins (or 3.6v if you take it to the extreme maximum rating Wink )


Attached Files Thumbnail(s)
   
#6
(07-29-2017, 08:33 PM)pfeerick Wrote: Hm... that part is "TTL/MOS Input/Output Compatible"... it shouldn't be a problem, should it Marcus?

But yes, don't connect anything above 3.3v to the GPIO pins (or 3.6v if you take it to the extreme maximum rating Wink )


Many compatible components exist that will work across a wide voltage ( which means they will work at 1v8, 3v3, and 5v ) but many more WILL NOT.  So , I don't get into the discussion of making exceptions ( if you're smart enough to figure it out, and if your components allow for it, great ! ).

The general discussion is can you mix 5v and 3v3 logic , and the answer is NO;  however, you may 'interface' 5v and 3v3 logic levels using a level shifter.  Always use appropriate level shifters when interfacing 5v and 3v3 logic;  way better safe than sorry.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#7
(07-29-2017, 10:17 PM)MarkHaysHarris777 Wrote: Many compatible components exist that will work across a wide voltage ( which means they will work at 1v8, 3v3, and 5v ) but many more WILL NOT.  So , I don't get into the discussion of making exceptions ( if you're smart enough to figure it out, and if your components allow for it, great ! ).

Pity you didn't actually answer the question I asked Wink That was the perfect time for you to link to a different sparkfun page :-P Since we all know that the VCC voltage doesn't always determine the comms/IO voltage. And that level shifters are good, but not always needed. The 'general discussion' is fine... but not when it doesn't actually answer the question.

(07-29-2017, 07:02 PM)ealbers Wrote: So say I have a ADC0832, its a 5V piece, it has a Digital out at 5V, whats the best way to read the output?  Resistor in series?  How big?

What about the inputs to the ADC0832, they register voltages over 2 volts as a 1, can I hook the outputs to the ADC0832's inputs??
Thanks!

Unfortunately, TTL Output means that it it is a VCC level output drive, thus cannot be connected to the pine64 GPIOs directly, since you stated 5v. The Transistor-Transistor Logic (TTL) output essentially means the output voltage for a logic high will be anything from 2.7 to VCC (5v in this case), making it so that you cannot directly connect it to the pine64 (unless you intend to damage it!).

However, it is often used by Raspberry Pi people, and run at 3.3v, so if you have it, and the voltage you are measuring is between 0 and 3.3v, give it a try with a 3.3v VCC. Just be aware that since it has a ratiometric voltage reference, that the 'scale' will also be 0.0 to VCC Wink If you want to learn a bit more about that part, see connection info, and some example code that you should be able to adapt for the pine64, have a look at Kolban's excellent free (or what you thing it's worth) Book on the Raspberry Pi, particularly the Analog to Digital conversion chapter. I would suggest though, that if you don't have a burning need for the ADC0832, 'upgrade' to the MCP3208, which has 12bit instead of 8bit resolution, and is also rated at 3.3v and 5v VCC by the manufacturer, meaning you're guaranteed it'll work Wink


Possibly Related Threads…
Thread Author Replies Views Last Post
  GPIO performance sgjava 0 1,463 10-08-2021, 08:31 AM
Last Post: sgjava
  Using GPIO with OS MikeA23 1 3,209 06-07-2019, 01:22 AM
Last Post: tllim
  read/write gpio in c example? ealbers 1 4,382 07-23-2017, 05:53 AM
Last Post: MarkHaysHarris777
  GPIO and OS Choice fsa317 3 4,724 05-02-2016, 04:30 PM
Last Post: rahlquist

Forum Jump:


Users browsing this thread: 1 Guest(s)