cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 all IO's are compliant to CMOS & TTL, while configuring pin as Output, how to select it as CMOS or TTL?

AG1
Associate II

Hi, as per datasheet of STM32F412VG all IO's are compliant (page 124) to CMOS & TTL, it's OK for input signal, but while configuring pin as output, how we will come to know logic level for the same, as VOH (min) is 2.4 for TTL & for CMOS it is (VDD-0.4) for 3.3 operating it will be 2.9V

i am interfacing device, where min. VIH (min) requirement is 2.48V, if controller pin is with TTL, it may create an issue

3 REPLIES 3
LCE
Principal

You cannot select between CMOS or TTL.

It's either input, open drain, or an "active" push-pull output, which is the one you need.

If you don't have super high load or transmission losses, the STM's high level will be very close to its supply voltage.

What is actually the other device, and what is its supply voltage?

AG1
Associate II

Hi , it is an LCD,

for controller VOH(min)

in CMOS (VDD-0.4), i.e. for any operating voltage higher than 2.9V it is greater than required level of 2.48V

but in TTL it is fixed 2.4V for any operating voltage, higher than 2.4V

my LCD operates on 3.1VDC, it's required VIL(max) is 0.62V & VIH(min) is 2.48V

so to full fill minimum VIH level, i need to ensure controller o/p logic levels remains as per CMOS

LCE
Principal

Interesting that the display runs on 3.1 V (I have zero experience with displays).

So you can definitely use the STM32 GPIOs, but for IO protection you should use some serial resistors, depending on line impedance / frequency, I would start with 49R9 or 47R.