cancel
Showing results for 
Search instead for 
Did you mean: 

Noob question-GPIO

rj
Associate II
Posted on January 09, 2013 at 06:03

I know this may be a silly question, so hopefully there is a quick answer: Im trying to configure one of the GPIO pins for a simple output. However when I measure the pin voltage, it reads 3v. Is there any way I can configure the output to be at 5v? I would think this would be as simple as setting the output mode (set to push\pull at the moment).

9 REPLIES 9
frankmeyer9
Associate II
Posted on January 09, 2013 at 09:00

Im trying to configure one of the GPIO pins for a simple output. However when I measure the pin voltage, it reads 3v.

 

How does it read 3 volt ?

Do you measure with a voltmeter, or do you mean ''High'' signal ?

Is there any way I can configure the output to be at 5v?

 

No.

Being ''5V tolerant'' means, this GPIO pin can accept 5V as input, without stopping to work properly.

A GPIO output can switch between ''Low'' and ''High'', which are GND (0V) and Vdd (3.3V). It never generates voltages in excess of Vdd.

rj
Associate II
Posted on January 09, 2013 at 16:17

Im just using a volt meter to measure the pin voltage when I trigger it from high to low. I just kinda of expeced it to be at the standard 5v when high, instead of 3v.

Posted on January 09, 2013 at 16:24

''the standard (sic) 5v''

 

5V has not been ''The  Standard'' for many years now! 

''instead of 3v''

Given that the processor is running on 3V, where would the 5V come from?

Note that it's an uppercase 'V' for volts.

jj2
Associate II
Posted on January 09, 2013 at 17:01

Suspect a, ''Discovery board'' lured you in.  ARM MCUs are complex devices - far beyond the ''usual'' hobbyist choice.

For you to succeed w/this class MCU - much serious reading (even study) of datasheets, code examples, this/other forums - is surely required. 

As stated - days of EZ solder, 40 pin MCUs in DIP packages - long gone!   Your 5V expectations are somewhat, ''time warped...''

Reading between the lines - should you seek to ''interface'' to older, 5V logic/devices - in many cases (but not all) the 3V3 MCU levels will be ''seen'' as logic high.  Where they are not - you must acquire voltage translator ICs (many makers) - which can convert from/to various voltage levels.

Posted on January 09, 2013 at 17:14

Also,  should you seek to ''interface'' to older, 5V logic/devices,  beware that the ''5V-tolerance'' of (certain) inputs does have some provisos -  again, much serious reading (even study) of datasheets, etc, is surely required. 

rj
Associate II
Posted on January 09, 2013 at 20:25

Thanks for the info. I believeI have 5v ingrained in my head from my logic design classes continually saying that logic high was 5v and a logic low was GND. Though the processor isnt 5v, the USB supplying the power to the board itself is at 5v, which is what led me to believe the GPIO would be such. Also the user manual is a little bit misleading when they are describing GPIO voltages, they made it sound like this is indeed possible.

jj2
Associate II
Posted on January 09, 2013 at 22:04

An unfortunate fact - most schools, ''do not keep up'' with newest/best...  5V has long been passe.

As FM stated earlier - only mention of 5V & GPIO most of us can recall - is the ability of some/many GPIO to handle 5V when the GPIO is configured as input - never output.  If you can find - and share here - any further such description - we'd be most surprised!

Posted on January 10, 2013 at 09:27

''the user manual is a little bit misleading''

 

Which user manual - the one for the Discovery board, or the one for the chip itself?

Note that the ones for the Discovery boards (and DevKits) contain full schematics - so you can see what voltages go where...

frankmeyer9
Associate II
Posted on January 10, 2013 at 11:06

Which user manual - the one for the Discovery board, or the one for the chip itself?

 

Admittedly, the ST style if documentation appears to be somehow fragmented.

I like TI's datasheets, which are like ''ST-Datasheet + ST-Reference Manual'', meaning you have it all in one document. It's a pity TI disregards M0 and apparently M3.

But nevertheless - as a beginner one should form the habit of gathering all available documentation of your item of interest, and read it carefully.

And admittedly, again, ST's manuals are a hard read sometimes ...