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?
connect the NTX with PIC18LF4550 via I2C
-
- Posts: 224
- Joined: 30 Oct 2010, 04:10
- Location: 127.0.0.1
- Contact:
Re: connect the NXT with PIC18LF4550 via I2C
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
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/
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
Re: connect the NTX with PIC18LF4550 via I2C
Code: Select all
My blog: nxttime.wordpress.com
Who is online
Users browsing this forum: No registered users and 3 guests