Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PCF8574 I2C Port expander

Status
Not open for further replies.

chandu13

New Member
Hi
I need Project help
I have interfaced 8 toggle switches to the PCF8574 I2C Port expander using LPC2114 Controller. I have to read the only one key status at time PCF8574 interrupt pin is connected to the External interrupt pin of the micro controller. In the External interrupt service routine I am enabling the Start bit of theI2C communication. Control will jump to the I2C interrupt routine and read the status of the I/O Pins & stops the I2C. But aim facing the problem with PCF8574 interrupts According to the PCF8574 data sheet; interrupt is generated by any rising or falling edge of the port inputs in the input mode.
I/O pins are in high state, whenever press the switch it will go to low state, by releasing the pin will go to high state.

When ever I press the switch interrupt is generating in the high to low state and low to high state, beacaise of this I am reading the input pin status 0XFF (normally all pins are in high state). Whenever I press the each switch I am getting 0XFE(sw1), 0XFD(sw2), 0XFB(sw3), 0XF7(sw4), 0XEF(sw5), 0XDF(sw6), 0XBF(sw7), 0X7F(sw8) status for corresponding switch, whenever I release the switch I am getting 0xFF status for corresponding switches,
Please suggest how to solve the above problem

Regards
Chandu
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top