Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 4th April 2009, 01:04 PM   #1
Default PCF8574 I2C Port expander

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
chandu13 is offline  
Reply

Tags
expander, i2c, pcf8574, port

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
expander nok6600app Electronic Projects Design/Ideas/Reviews 2 13th July 2007 01:04 PM
32 Bit Serial IO Expander Firmware Check freeskier89 Micro Controllers 4 30th June 2006 10:15 PM
Operate a relay from a PC port RS232 or Parallel port Eddie ESV Electronic Projects Design/Ideas/Reviews 2 12th June 2004 08:43 AM
[ann] COM Port Toolkit - serial port monitoring on Win32 PCs MGolikov Electronic Projects Design/Ideas/Reviews 0 6th April 2004 07:17 AM
Designing a circuit to convert game port to serial port Diluka Moratuwage General Electronics Chat 1 29th July 2003 05:40 PM



All times are GMT. The time now is 12:19 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker