connect the NTX with PIC18LF4550 via I2C

Discussion specific to the intelligent brick, sensors, motors, and more.
Post Reply
nichrist
Posts: 1
Joined: 22 Jan 2011, 01:11

connect the NTX with PIC18LF4550 via I2C

Post by nichrist »

I am trying to connect the NTX (master) with a PIC18LF4550 (slave) microcontroller via the I2C bus. NTX every 50ms writes to the I2C (first byte address, second register value) with a NI program using direct commands. I have tested the above program with the LEGO ultrasonic sensor witch use the I2C bus and I verify that it works fine.
For I2C clock and data interconnection I used the recommended 82K pull-ups resistors to the 4.5V provided by the NTX. Because the PIC is working with 3.3V I try also and connected the pull ups resistors to the 3.3V of the PIC supply voltage.
But PIC never achieve to identify his slave address transmitted by NTX (I set it to 0x02). With the NTX program I also change/sweep the transmitted address to all values up to 128 with no result. The only result that PIC records is a STOP bit (via its I2C STATUS register).
Only when enabling PICs I2C General Call Enable bit, PIC receives interrupt from the I2C due to a master transmission of a request. But also in this case PIC reads address 00 (and generates I2C interrupt) even if the address trasmited by the NTX is not 00.
I suspected that PIC don’t understands the ones transmitted by NTX or something like that.
Any suggestions?
timpattinson
Posts: 224
Joined: 30 Oct 2010, 04:10
Location: 127.0.0.1
Contact:

Re: connect the NXT with PIC18LF4550 via I2C

Post by timpattinson »

Maybe posting the source of your program on the NXT brick and the PIC would help.
Also, I'm not an expert but the I2C interface implemented in the US sensor is a bit shaky so that is not proof that it works.
ps. no offence, but its NXT not NTX.
-Tim
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
aswin0
Posts: 201
Joined: 29 Sep 2010, 06:58

Re: connect the NTX with PIC18LF4550 via I2C

Post by aswin0 »

You might find some useful info in this thread.
My blog: nxttime.wordpress.com
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests