Quad-Rotor project I2C blockset

Create new topics, add your comment, remark, bugs...
Post Reply
Liverpool
Posts: 2
Joined: Fri Feb 26, 2010 11:16 am

Quad-Rotor project I2C blockset

Post by Liverpool » 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!
Attachments
hmc6353_i2c_operational_overview.pdf
(148.97 KiB) Downloaded 466 times

Liverpool
Posts: 2
Joined: Fri Feb 26, 2010 11:16 am

Re: Quad-Rotor project I2C blockset

Post by Liverpool » Fri Feb 26, 2010 12:27 pm

In the specifications of dsPIC30F4013 I found address value of 120, but not sure about it? Is it dsPIC address? Where to find it?
For HMC6352 addresses for Write is 42(hex) and for read 43(hex)
magnetometer operation frequency is 100kHz

So as I understand I have to create to I2C blocks with sequencies as follows:
'S A120 W42 P' and 'S A120 W43 P'? or 'S A120 W42 R43 P'?

but anyway there is clock signal and how will I get output headings Mag X and Mag Y?

Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests