Quad-Rotor project I2C blockset
Posted: Fri Feb 26, 2010 11:38 am
Hi Lubin,
I need some help with I2C blockset. I am using dsPIC30F4013 and magnetometer HMC6352. I struggle to communicate with with as my magnetometer sencor.
This is principal of opperation:
"There is a clock line (SCL) and a data SDA line in this bus specification and a host of devices can be connected. The bus can be a
single Master – multi Slave or it can be a Multi-Master configuration. All data transfers are initiated by the Master device which is
responsible for generating the clock signal, and the transfers are 8 bit long. All devices are addressed by its unique 7 bit Address.
After each 8-bit transfer, the Master generates a 9 th clock pulse, and the transmitting device releases the SDA line. The receiving
device will pull the SDA line low to acknowledge (ACK) the successful transfer or leave the SDA high to NACK."
full document attached.
Question:
Could you advice how to generate the clock signal addressed to the sencor in I2C and how to read the I2C data from the sencor? Do you have any example to see how I2C bus master is used?
Very Big Thanks in advance!
I need some help with I2C blockset. I am using dsPIC30F4013 and magnetometer HMC6352. I struggle to communicate with with as my magnetometer sencor.
This is principal of opperation:
"There is a clock line (SCL) and a data SDA line in this bus specification and a host of devices can be connected. The bus can be a
single Master – multi Slave or it can be a Multi-Master configuration. All data transfers are initiated by the Master device which is
responsible for generating the clock signal, and the transfers are 8 bit long. All devices are addressed by its unique 7 bit Address.
After each 8-bit transfer, the Master generates a 9 th clock pulse, and the transmitting device releases the SDA line. The receiving
device will pull the SDA line low to acknowledge (ACK) the successful transfer or leave the SDA high to NACK."
full document attached.
Question:
Could you advice how to generate the clock signal addressed to the sencor in I2C and how to read the I2C data from the sencor? Do you have any example to see how I2C bus master is used?
Very Big Thanks in advance!