I need to use different I2C pins

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to use different I2C pins

671 Views
esam_me
Contributor II

Hello, I know this seems crazy (at least for me!) But I need to use different pins for the I2C communication, as my hardware forces me to. So this is a very specific case. My MCU is LPC1114/302 and per default the SCL/SDA Pins are PIO0_4/PIO0_5 But as said I can't unfortunately use them. Instead I have to use PIO1_2/PIO3_0 respectively.

Is this in anyway possible?? I was thinking this could be done manually by writing a library for these pins to work as I2C pins but this seems a hard job to do which I would leave as the last choice.

I would be grateful if someone has another idea!

6 Replies

592 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Eimaghrabi,

Sorry for misunderstanding you.

I think it is okay to use GPIO pins to simulate the I2C if the GPIO pins can be set up as open drain mode.

But I do not find out the code based on LPC.

I have the code to use DSC, I attach it just for reference.

BR

XiangJun Rong

592 Views
esam_me
Contributor II

thanks Rong, thats exactly what I needed!

0 Kudos

592 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Eimaghrabi,

Can you tell us the part number you are using for example LPC1114FHN33/302 or LPC1114FHI33/302?

Anyway, I attach the data sheet of LPC111x family, pls check the pin assignment for the specific package.

BR

XiangJun Rong

0 Kudos

592 Views
esam_me
Contributor II

Hi Rong, it's LPC1114FBD48/302. In the data sheet PIO1_2 can be used as a timer(CT32B1_Mat1).

I think this means it can work as an SCL-Pin. The PIO3_0 pin is normal GPIO-Pin. The question is: is there any code which handels this case already? A code which implements the I2C protocol from scratch?

  • Im Wörterbuch speichern
    • Keine Wortliste für Englisch -> Arabisch...
    • Eine neue Wortliste erstellen...
  • Kopieren
  • Im Wörterbuch speichern
    • Keine Wortliste für Englisch -> Arabisch...
    • Eine neue Wortliste erstellen...
  • Kopieren
0 Kudos

592 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Eiamghrabi,

Pls refer to the following Table 3 pin description overview which I copied from the LPC111x.pdf, the LPC111x,pdf  was attached  in last Email.

The Table 8 or Figure 3 describe the pin assignment of LPC1114FBD48/302.

pastedImage_1.png

Figure 3:

pastedImage_2.png

From Figure 3, we see that the pin36 PIO3_0/DTR and pin 35 R/PIO1_2/ADC3/CT32B1_MAT1  are NOT I2C pins.

Hope it can help you

BR

XiangJun Rong

0 Kudos

592 Views
esam_me
Contributor II

Hello Rong, no it doesn't help! Do you really understand what I am asking for? I know that this pins aren't the I2C Pins! I need to use different pins for I2C!! This means I am looking for a code which defines the I2C protokoll from scratch! I have the data sheets already and don't need a help in reading what pins are defined to do what!

0 Kudos