cancel
Showing results for 
Search instead for 
Did you mean: 

STM8 FT(Five Volt Tollerant Pins) Problem

leoren_tm
Associate II
Posted on March 26, 2011 at 14:25

STM8 FT(Five Volt Tollerant Pins) Problem

6 REPLIES 6
fggnrc2
Associate II
Posted on May 17, 2011 at 15:12

Hello Leo!

A five volt tolerant input pin is a pin which keeps working even if a +5V is applied to it.

Such voltage may inject a current which can damage an input if it's higher than the limit which is stated in the datasheet.

As far I can understand, your circuit contains a 3V3 domain and a 5V domain.

A 5V domain device drives a 3V3 domain device analogue input.

In this situation, the STM8 ADC saturates for some input ranges.

In my opinion, a resistive partitor is the solution.

When you dimension the resistor values, be warned that the ADC input may draw a microAmpere, so you can't use high value resistors. You have also to take into account the output resistance and the max ouput current of the 5V device.

A separator circuit (e.g. a voltage follower) may also be required if output and input resistance don't match.

Regards

EtaPhi

leoren_tm
Associate II
Posted on May 17, 2011 at 15:12

Hi, can you explain more on ''resistive partitor''....and yes your understanding is correct, my STM8 drive on 3.3V while a 5V device is connected by I2C [FT pins] device, i didnot use a level converter because I was thinking that internal on a FT device works like its a level converter.

Thank you EtaPhi

leoren_tm
Associate II
Posted on May 17, 2011 at 15:12

Hi EtaPhi..

    As the application note says, it should be ok if it was an FT pins, in which STM8L152 I2C pins are FT. My problem now is that, when  that 5V device connected to my 3.3V unit by I2C, my ADC pins measure higher than with-out that....I really cannot pin-point the problem as I think it would mean understanding the STM8 chip design..

fggnrc2
Associate II
Posted on May 17, 2011 at 15:12

Sorry, Leo, I didn't understand your question...

So your problem is a I2C interfacing one.

Please, have a look at this application note on I2C interfacing

http://ics.nxp.com/support/documents/interface/pdf/an97055.pdf

EtaPhi

fggnrc2
Associate II
Posted on May 17, 2011 at 15:12

Leo,

I suppose that you are using PC0 for I2C_SDA and PC1 for I2C_SCL.

These pins feature true open drain outputs, so no protection diode is internally connected to VDD and there is no pull-up (see page 117 of RM0031 - STM8L15x and STM8L16x microcontroller family Reference Manual).

The wrong ADC readings are probably due to current injection (i.e. current sinking) which excess the 5 mA limit for each pin and 25 mA for all pins.

In my opinion, you can try two things to solve this problem.

The first one, is adding the two N-MOS to the I2C bus as the Application Note suggests.

The second one, is supplying a regulated VDDA to the micro. This option is available only for STM8L152Cx packages, so it may not help you.

Regards

EtaPhi

leoren_tm
Associate II
Posted on May 17, 2011 at 15:12

Hi EtaPhi.

There should be no diode as its design to be FT which is above VDD, and yea maybe my only solution is the number 1 in which, the FT of the MCU would be useless.. ;(

Thank you