Search the Community
Showing results for tags 'OpenCollector'.
I'm writing my own i2c library and need to be able to simultaneously change PinMode on 2 pins. One for SCL and one for SDA. Is there a way to change PinMode on 2 pins simultaneously? I want the behavior of the follwing: PinMode(14,OUTPUT); PinMode(15,INPUT); without the 2.5microsecond delay between the 2 calls above.
So, I'm using Energia and getting frustrated with Wire.h. I need to do some i2c communications and figured it would be fairly easy to write my own Bit-Bang implementation of i2c. I got started and things seem to be working pretty well. However, I discovered the concept of OpenCollector. It seems that OpenCollector means that the pin is set to High by default with a Pullup Resister and you just set it to LOW and then it goes back to high when you're not setting it to LOW. It also goes to low when a slave i2c device sets it to LOW. Question is how the heck do we do this with Ene