View Full Version : Basic Stamp with 3.3v I2C

03-15-2010, 07:34 AM
I am trying to interface my BS2px to a chip using I2C. This chip uses 3.3v logic levels and cannot tolerate the stamp's 5v. If I just pull up the SDA and SCL lines to 3.3v instead of 5v, will this work okay? I think it should work since the lines are never driven high, just released and driven low, right? I just wanted to have someone check me on this so that I don't fry my chip with 5v. Thanks!

03-15-2010, 07:50 AM
Post a link to the data sheet for this chip

··Thanks for any·http://forums.parallax.com/images/smilies/idea.gif·that you may have and all of your time finding them http://forums.parallax.com/images/smilies/smile.gif


Mike Green
03-15-2010, 11:05 AM
There's a long thread on the Propeller forum about connecting 3.3V and 5V devices and, although it mostly applies to hooking the Propeller to 5V devices, it works the other way as well. Look here: http://forums.parallax.com/showthread.php?p=791527 under "Technical Considerations".

03-15-2010, 01:53 PM
I would try it since your driving the SCL and·SDA·lines from 0 to 3.3 v, these should be open collector and should never be higher than the pull up resistor to VDD that you are connecting them to.·I cant see the stamps SCL SDA lines frying at 3.3v.

It should just be a matter of·if the stamp will reconize the data at that voltage/timming.

Phil Pilgrim (PhiPi)
03-15-2010, 02:08 PM

Your approach should work fine. The danger, of course, is a program bug that inadvertently drives one of the lines high. If you stick with the I2CIN and I2COUT commands, you should be safe. Although the PBASIC manual does not say so explicitly, one can infer from other hints in the description that neither SDA nor SCL are driven high by either command. But, in the words of 1980s détente, "Trust, but verify." Also, the BS2px should have no trouble recognizing 3.3V as a logical high.


03-15-2010, 08:49 PM
Thanks for the replies. If I look at the signals on my oscilloscope, they do not appear to reach over 3.3v. However, there does seem to be a slight glow at a higher voltage. I'm not that experienced with oscilloscopes, so I don't know if this is a higher voltage or just a reflection on the screen or something. I just want to be sure because I don't want to fry my new chip which would be hard to replace in its circuit.
P.S. I intend to use a 3.3v PIC in my final circuit, but am using the stamp to make the program easier to develop and reduce complications for now.

Phil Pilgrim (PhiPi)
03-15-2010, 10:29 PM
If you want to test the Stamp further with your scope, reconnect the pull-ups on SDA and SCL temporatily as pull-downs to Vss. You should never see excursions above zero volts. If you do, you will know that the Stamp is occasionally driving a line high.


03-15-2010, 10:31 PM
Thanks. Great idea, I will try it.