Even more questions on I2C

Forum related to the FLEX boards

Moderator: paolo.gai

Locked
Alberto_82
Newbie
Posts: 30
Joined: Wed Sep 03, 2008 2:15 pm

Even more questions on I2C

Post by Alberto_82 » Wed Sep 24, 2008 2:03 pm

Hi to all, guys!
My problems with i2c bus are driving me crazy!
I\'ve tried to dial with a compass, HMC6352 by Honeywell, but I didn\'t receive no answers. So I\'ve taken my oscilloscope to see if signals sequence on pins RG3_PIN56 and 57 (i2c port n°1) was right.. Surprise: no signal were sent by the Flex to the sensor. I tried to set and reset I2C1CONbits.I2CEN bit, to send the sensor as start sequence by the I2C1CONbits.SEN bit, but the line was kept low.
I don\'t know what to do...
Please help me!!

Tnx...

/Alberto

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re:Even more questions on I2C

Post by paolo.gai » Wed Sep 24, 2008 2:12 pm

Alberto,

did you used the I2C code we used for the I2C compass in the Embedded World 2007 demo? I remember I have seen the device working...

bye

PJ

Alberto_82
Newbie
Posts: 30
Joined: Wed Sep 03, 2008 2:15 pm

Re:Even more questions on I2C

Post by Alberto_82 » Wed Sep 24, 2008 3:12 pm

yes I did! But nothing works...
The problem is that I have to use it for my Thesis.. I\'m of University of Pavia, Tullio is my supervisor and told me to contact you!!

Bye,
/Alberto

nino
Newbie
Posts: 15
Joined: Thu Sep 04, 2008 1:14 pm

Re:Even more questions on I2C

Post by nino » Thu Sep 25, 2008 9:07 am

You remembered to put the pull-up resistors on I2C bus clock and data lines?

You respected all the init phases? TRISxbits for directions, clock multipliers compatible with the system clock and so on?

Nino

Alberto_82
Newbie
Posts: 30
Joined: Wed Sep 03, 2008 2:15 pm

Re:Even more questions on I2C

Post by Alberto_82 » Thu Sep 25, 2008 9:54 am

Ehm... not at all! Where does the pull up resistors might be placed? I didn\'t know that, sorry. Is it on the EE docs? I\'m going to try finding it, now.
Talkin\' about the TRISxbits: yes, I think I\'ve setted it in the right way, looking to the \"pic30_Embedded_World_2007\" example.
I\'m working to obtain something, now...
Thanks!!!

/Alberto

nino
Newbie
Posts: 15
Joined: Thu Sep 04, 2008 1:14 pm

Re:Even more questions on I2C

Post by nino » Thu Sep 25, 2008 10:01 am

In the demo folder you also can find the schematich for the homemade board. In that you can spot the resistors with the right placement and value.

Alberto_82
Newbie
Posts: 30
Joined: Wed Sep 03, 2008 2:15 pm

Re:Even more questions on I2C

Post by Alberto_82 » Thu Sep 25, 2008 10:14 am

Thank you!
I understand where to put the resistors... I\'m going to build the circuit!
Bye,
/Alberto

Alberto_82
Newbie
Posts: 30
Joined: Wed Sep 03, 2008 2:15 pm

Re:Even more questions on I2C

Post by Alberto_82 » Thu Sep 25, 2008 2:14 pm

Thank you Nino!!!
Now it works!!! I\'ve just put the pull-up resistors in the right place and voilà, all works fine!!!

Many thanks...

/Alberto

Locked