So if we want to read the data of the X-axis, first we need to send the device address and then the particular internal register address for the X-axis. For example the ADX345 Accelerometer has a unique device address and addition internal registers addresses for the X, Y and Z axis. The internal registers are locations in the slave’s memory containing various information or data. Next is the internal registers addressing. The device addressing sequence stars with the most significant bit (MSB) first and ends with the least significant bit (LSB) and it’s actually composed of 7 bits because the 8 th bit is used for indicating whether the master will write to the slave (logic low) or read from it (logic high). After this the clock starts and each data bit is transferred during each clock pulse. The start condition occurs when data line drops low while the clock line is still high. Let’s take even closer look at these events. Right after the addressing sequences follows the data sequences as many until the data is completely sent and it ends with a special stop condition. After the first Acknowledge bit in most cases comes another addressing sequence but this time for the internal registers of the slave device. After each 8 bits sequence follows a bit called Acknowledge. So after a special start condition occurs comes the first 8 bits sequence which indicates the address of the slave to which the data is being sent. So you are pretty limited in what you can do on the Due side if things aren't working.The data signal is transferred in sequences of 8 bits. On top of this, the PCA9306 also makes the Due side bus capacitance visible to the other side, so adding caps to the Due side is not a good option either. My main point here is that the PCA9306 does not maintain VREF1 if the pullup values are increased, so it may not be possible to tune the pullups on the Due side to the desired value. Perhaps 3.4 should not be a worry, but in any case, the communications do not work when the 270pF caps are removed. Note as well in this situation that VREF2, measured at the EN pin remains at very nearly 4V (where it should be, given that the supply is 5V) even as the pullups are changed, so it doesn't seem that fiddling with the 200k resistor is the answer either (although I admit to exhaustion rather than exhausting all possibilities). Indeed, why would SDA1 and SCL1 start to climb as I increase the value of their pullups? They should stay at VREF1 = 3.3V, but they don't. Seems to me that's pretty typical of I2C though. The only thing I am noticing is a fairly strong ring at the bottom of the I2C falling edges. The only mystery here is why the Due is not working with 10k pullups. I mention this here only because the PCA9306 is often recommended, but it seems that you cannot really tune the Due side pullups without affecting the level. However, it seems that if you raise the pullups above 10k or so, the PCA9306 cannot maintain a 3.3V level on the Due side, and it starts to creep up. The next answer is to raise the value of the pullups and remove the caps. A few such circuits added to the bus degrades the rise times and the bus stops working. However, the capacitance is visible through the PCA9306 to the bus, and that's not good. Adding 270pf bypass caps on SCL and SDA on the Due side solved everything. The Due is not reliably communicating in this configuration unless I happen to have a scope probe on the SCL line. Hi folks, I am using a PCA9306 to step down a 5V based I2C bus to 3.3V for the Due.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |