On Tuesday, February 08, 2000 Robert Rolf wrote: > So why bother with the diode or the zeners? > I2C bus is Open Drain so all you need is pullups to 3.3V. Robert, you're right about that I2C is open drain bus, but PORTB of PIC isn't. Zener is just to protect 3.3V slave if PIC puts 5V on SDA or SCL line, which happens when PIC is misconfigured or during power-up. The diode serves the same purpose, though it limits SCL to one direction. Use SDA setup for SCL if you like. > Nothing more. VinH min is 1.4V so the 3.3V easily reaches that. > Best circuit. >> +3.3V +3.3V >> 5V | | 3.3V >> ------------- R R ------------- >> | PIC | | | SDA | | >> | |-------------o-------------| SLAVE | >> | | | | | >> | MASTER |-------o-------------------| | >> ------------- SCL ------------- > 16F876 spec for I2C port in SMBus mode is VinL max is 0.6V. Adding a Giorgio uses 16C84 as Master, remember? If you imply that the 3.3V Slave may have the threshold of 0.6V, well, in that case series diode can't be used. You still must protect slave from overvoltage with Zener. > diode cuts your noise margin to ZERO so you better use Schmidt mode > (1.4V) but even then your noise margin is half what it could be without > the series diode (which you don't need anyway). > Nikolai Golovchenko wrote: >> >> Better circuit: >> >> +3.3V +3.3V >> 5V | | 3.3V >> ------------- R R ------------- >> | PIC | | | SDA | | >> | |-------------o-------------| SLAVE | >> | | | | | | >> | MASTER |--|<|--o-------------------| | >> ------------- 1N4148 | SCL ------------- >> Zener >> 3.6V >> | >> ===