cancel
Showing results for 
Search instead for 
Did you mean: 

how to output 5V to GPOIC_Pin7 instead of 3.3V

aymen
Associate II
Posted on July 01, 2014 at 13:11

hi,

I'm using LCD with stm32f107 vct6, I need 5V for backlight.

I configure GPIOC_Pin7 as GPIO_Mode_Out_OD and I connect it with 4K7 resisator and 5V.

GPIOC_Pin7  -------->-------->OUT 

               4K7

  ^

          ^

5V 

I measure at OUT it is 3V. 
6 REPLIES 6
schauer
Associate II
Posted on July 01, 2014 at 13:52

bellili,

do you have a pull-down/pull-up or an alternate function configured on that pin?

chen
Associate II
Posted on July 01, 2014 at 13:54

Hi

''I'm using LCD with stm32f107 vct6, I need 5V for backlight.

I configure GPIOC_Pin7 as GPIO_Mode_Out_OD and I connect it with 4K7 resisator and 5V.''

Some STM32 IO pins are 5V tolerant.

None of them can output 5V!

I doubt that the IO pin can supply enough current for LCD backlights.

Using a resistor and OpenDrain IO confiuration, you are just sinking current via the IO pin.

You need to drive a transistor (as a switch),

3.3V into the base needs to turn the transistor on (need a current limiting resistor).

5V on the Collector side.

Output can be on the collector or emitter. The load will limit the current but you can add a current limit resistor on the collector.

aymen
Associate II
Posted on July 01, 2014 at 14:14

bs,

out_OD.

aymen
Associate II
Posted on July 01, 2014 at 14:16

0690X0000060MmUQAU.gif,

I'd like to controle the delay of backlight,

I didnt understand your solution.

Posted on July 01, 2014 at 14:47

I'd like to controle the delay of backlight, I didnt understand your solution.

But what is the CURRENT requirement for this 5V back-light supply? The 47K is going to act as a divider in this situation.

The suggestion was to use transistor/inverter circuit as a driver capable of switching 5V more directly to the back-light supply feed.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
chen
Associate II
Posted on July 01, 2014 at 16:37

Hi

As Clive1 said.

Have a look at this :

http://cq.cx/interface.pl#12

(look at ''Switch a 100 mA, 10 V Load'' )

Has the basic circuit but you do not need D1

or Look at these :

http://www.opencircuits.com/Basic_Circuits_and_Circuit_Building_Blocks

(Look at ''

Transistor Low Side Switch

'' - same as one above

or ''

Transistor High Side Switch

'' )

This is what I meant by ''Output can be on the collector or emitter''

''The load will limit the current but you can add a current limit resistor on the collector.''

Notice the 'R_led' - this is to limit the current for the LED.

In your application, the backlight will limit the current for itself BUT what happens if something goes wrong?

If the backlight does not limit the current - the transistor will short out the power and damage itself (transistor) and possibly the PSU, so by adding a current limit resistor in you protect the circuit. Something like a 10ohm resistor will stop a dead short but still allow the current to flow.