Discussion forum for the BasicX family of microcontroller chips.
|
Hi, I am working on communicating witht the DS1077 programable oscillator. I have looked around and found I2C routines and compared them to the one I am trying to develop. I have noticed that none of the routines use the shiftout or shiftin commands, they use for-next loops. I think that the shiftout and shiftin commands would be faster then the loops but am I wasting my time trying to reinvent the wheel? Thanks, Kevin |
|
|
|
The two states on the I2C bus are near ground (logic zero) and high impedance (logic one). The external pullup (4.7K) is used to hold the lead high when the BX24 termianl is in a high impedance state. When the master is talking to the slave, it sends a byte and then holds the SDA lead at high Z for one clock pulse to allow the slave to acknowledge by pulling the SDA lead low. Note that with the shiftout command, the two logic states are near ground and near a hard +5 VDC, not ground and high Z. Peter H Anderson, http://www.phanderson.com --- In basicx@y..., "kj62" <kj62@y...> wrote: > Hi, > I am working on communicating witht the DS1077 programable oscillator. I have looked around and found I2C routines and compared them to the one I am trying to develop. I have noticed that none of the routines use the shiftout or shiftin commands, they use for-next loops. I think that the shiftout and shiftin commands would be faster then the loops but am I wasting my time trying to reinvent the wheel? > > Thanks, > Kevin |
|
|
|
I know its been a while but I've tried using shiftout and shiftin for I2C
communication. Thats actually what they are designed for. All i had to do was just replace
the bit banging part of phandersons I2C code and it works a gazilllion times faster. Ok
maybe not that many, but there is a signifigant increase in performance. Just to let you
guys know that it can be done. --- In basicx@y..., "pha555" <pha@p...> wrote: > > The two states on the I2C bus are near ground (logic zero) and high > impedance (logic one). The external pullup (4.7K) is used to hold > the lead high when the BX24 termianl is in a high impedance state. > When the master is talking to the slave, it sends a byte and then > holds the SDA lead at high Z for one clock pulse to allow the slave > to acknowledge by pulling the SDA lead low. > > Note that with the shiftout command, the two logic states are near > ground and near a hard +5 VDC, not ground and high Z. > > Peter H Anderson, http://www.phanderson.com > > --- In basicx@y..., "kj62" <kj62@y...> wrote: > > Hi, > > I am working on communicating witht the DS1077 programable > oscillator. I have looked around and found I2C routines and compared > them to the one I am trying to develop. I have noticed that none of > the routines use the shiftout or shiftin commands, they use for-next > loops. I think that the shiftout and shiftin commands would be faster > then the loops but am I wasting my time trying to reinvent the wheel? > > > > Thanks, > > Kevin |