I2C1 Setup for LPC18xx Microcontroller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C1 Setup for LPC18xx Microcontroller

916 Views
ronkieley
Contributor I

I'm having trouble setting up and performing transfers on the I2C1 interface on the LPC1812JET100 microcontroller.

This microcontroller has two I2C interfaces:

 One Fast-mode Plus I2C-bus interface with monitor mode and with open-drain I/O pins conforming to the full I2C-bus specification. Supports data rates of up to 1 Mbit/s.

 One standard I2C-bus interface with monitor mode and standard I/O pins.

I'm having no trouble setting up and using the full specification, open drain I2C0 port.

I can't seem to setup and execute a transfer to devices on the I2C1 port.  I realize that this is not a standard open-drain I2C port but I could not find any information on the use of I2C pullups on this port.  So, I put 3.65Kohm pullups on each I2C1_SCL and I2C1_SDA signal line.

I setup the Port 2_3 SDA signal line as Function 1 and enabled the input buffer.  I setup the Port 2_4 SCL line as Function 1.  I have set pullup and pulldown resistors on both ports as disabled since I have external pullups on these lines.

When I try to do a transfer on the I2C1 bus I get no signal transitions on the I2C1 signals.  This seems to indicate that I don't have the pins setup correctly.  I searched through the forums and LPCOpen software for example setup code but I was I was not able to find any suggested setups for I2C1 pins.

This is a really critical interface for my product and our product launch is approaching.  The devices on this bus are a NXP GPIO Expander and a I2C serial EEPROM.

Thanks in advance for your help.

Ron

Labels (1)
Tags (2)
0 Kudos
1 Reply

729 Views
miguel_mendoza
NXP Employee
NXP Employee

Hi Ron Kieley,

I used an example called pherip_i2c that you can find in the LPCOpen examples for that board in the link below https://www.nxp.com/support/developer-resources/software-development-tools/lpc-developer-resources-/...

LPCOpen.

In this example, you can select which I2C interface you want to use, checking the code, the part when the I2C1 pins are configured is the same as you are doing, only disable the glitch filter too.  I put 2.2Kohm pullups on each I2C1_SCL and I2C1_SDA signal line and with the help of a logic analyzer to check the I2C wave, I get this:

I2Cima.png

I get that signal transition, so if you don't get anything, check the example, maybe something is missing, or provide your source code, to see whats happening.

Wish it helps you!
If you still have problems, please let me know!

regards,
Miguel

0 Kudos