SAMPLE I2C PROGRAM USING LPC11E36

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

SAMPLE I2C PROGRAM USING LPC11E36

1,498 Views
kamalesh
Contributor I

Hello Team,

I have to do the i2c program in my custom board which having lpc11e36 microcontroller.

Below I attached my present code please review and give the comments.

Mainly tell me about board library files, where i will get this board library files.

Regards,
Kamalesh.C

Labels (2)
0 Kudos
Reply
7 Replies

1,482 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hello kamalesh 

For LPC11xx, please refer to LPCOpen Software for LPC11XX | NXP Semiconductors

You can check the available examples "LPCOpen for LPC11E68", I2C demo is included.

Hope this will help you.

Have a nice day,

Jun Zhang

0 Kudos
Reply

1,467 Views
kamalesh
Contributor I

Hello Zhang,

In this software examples, There is lpc11U6x.c examples. I have uploaded this example. But no response.
Can i use the lpc11u6x series example for my lpc11e36 microcontroller?

I tried UART Program, this itself is not happening. But my UART Program is working well.
Regards,
Kamalesh

0 Kudos
Reply

1,462 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi kamalesh,

I don't have LPC11e36 board to test. But please try lpcopen for LPC11u37 board. Can it work for you?

Best Regards,

Jun Zhang 

0 Kudos
Reply

821 Views
kamalesh
Contributor I

Hello zhang,

Actually I tried the uart example for my board. This itself is not working. How this i2c will work??

I have uart example for my board, it is working fine. so it is based on the library file or board file. i have the i2c driver and uart driver file. but my example is not working. I given my program for your reference.

I tried ethernet examples also with my board. it is working super fine. but for this i2c, it is giving trouble now.

What can i do for this i2c now?
Feel free to ask any question.

Best Regards,
Kamalesh.C

0 Kudos
Reply

765 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi kamalesh 

Could you please confirm, Does the default lpcopen for LPC11u37 board I2C demo project (without any change) work on your lpcopen for LPC11E36 board? I need to know if the problem is related with the PCB design.

Thanks,

Jun Zhang

0 Kudos
Reply

749 Views
kamalesh
Contributor I

Hello ZhangJennie,

I tried the i2c program from the lpcopen examples of LPC11u37 in my board. But unfortunately, it is not working in my board.

I tried the normal uart examples from that same lpcopen examples, it is not working for me. This is the one I explained in my previous post.

If my explanation is not in understandable manner, feel free to ask again.

Regards,
Kamalesh

0 Kudos
Reply

615 Views
Joey_z
NXP Employee
NXP Employee

hi kamalesh ,


I used LPC11U37 to do some IIC experiments. I used the LPC11U37 development board to run the nxp_lpcxpresso_11u37h_periph_i2c program in LPCopen. Through this program, the LPC11U37 development board was configured as a master. Then the LPC55S69 development board was used to run the lpcxpresso55s69_i2c_polling_b2b_slave program as a slave.

The operation of the LPC11U37 master in the experiment is shown in the figure below.

XuZhang_0-1720409674903.png

In the figure, 0x48 is the slave address set in the lpcxpresso55s69_i2c_polling_b2b_slave program running on the LPC55S69. By debugging this program, *buf = (uint8_t)base->SLVDAT in the I2C_SlaveReadBlocking function can be used to view the data written from the master. At the same time, the transmission data that can be viewed through the logic analyzer is shown in the figure.

XuZhang_1-1720409703792.png

Note:  After each read and write operation on the LPC55S69 slave, a reset is required. The slave also be reset after probing available I2C devices.

The experimental hardware connection is shown in the figure.

XuZhang_2-1720409765270.png

 

Hope this helps you.

BR

Xu Zhang

0 Kudos
Reply