hippicurean wrote:Thanks for the reply, skoehler. You mentioned that the "internal register number has been moved to the byte array." Would you mind explaining to a novice what that means?
hippicurean wrote:Also, you said that the internal register address is only the first byte. This brings to mind something that has confused me for awhile. I'm able to read from the HiTechnic Compass Sensor using a combination of Matlab, Simulink and nxtOSEK. The sensor's internal registers 0x44 and 0x45 are where the data is being read. During my learning process, I've programmed a microcontroller to respond to the same device ID and internal registers as the compass sensor. I discovered to my surprise that the microcontroller only detects the first register address being sent by the NXT master.
skoehler wrote:The first byte of the array that the write_data pointer points to is now the internal register address. What used to be the first byte is now the second byte etc.
skoehler wrote:First of all, the NXT only sends one register number (0x45). The I2C sensor must automatically append the value of 0x46 if the NXT master reads two bytes and not one.
hippicurean wrote:skoehler wrote:First of all, the NXT only sends one register number (0x45). The I2C sensor must automatically append the value of 0x46 if the NXT master reads two bytes and not one.
I had always thought that it was the master device that does the automatic increment of the register address. How else would the slave know if the master wanted to access the next sequential register address?
hippicurean wrote:Thanks for clearing up my misunderstanding about the auto-increment feature, Andy and skoehler. Now, could any of you (or anyone else) help me with modifying the old "i2c_start()/i2c_start_transaction()" code to interface with the new "i2c_start()"? I asked a few questions previously regarding this issue but no one has yet answered them.
skoehler wrote:Why don't you contact the nxtOSEK developers?
Users browsing this forum: Google [Bot] and 2 guests