2011-03-26 06:25 AM
STM8 FT(Five Volt Tollerant Pins) Problem
2011-05-17 06:12 AM
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 EtaPhi2011-05-17 06:12 AM
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 EtaPhi2011-05-17 06:12 AM
2011-05-17 06:12 AM
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 interfacinghttp://ics.nxp.com/support/documents/interface/pdf/an97055.pdf
EtaPhi2011-05-17 06:12 AM
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 EtaPhi2011-05-17 06:12 AM
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