I2C witch PCF8574P (keypad 4x4)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2013-03-20 12:14 PM
Posted on March 20, 2013 at 20:14
#stm32f103rb-i2c-pcf8574p-keypad
Hi,
I would like to control keypad through PCF8574, but some problemsare occurring like (reading only one time), and receiving 'ack' even disabled.''http://www.nxp.com/documents/data_sheet/PCF8574.pdf''(see de picture below)
Labels:
- Labels:
-
STM32F1 Series
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2013-03-20 3:08 PM
Posted on March 20, 2013 at 23:08
void Configuration_I2C (void)
{/* Enables the specified I2C peripheral. */
I2C_Cmd(I2C1,ENABLE); I2C_DeInit(I2C1); I2C_StructInit(&I2C_InitStructure);/* Init I2C */
I2C_InitStructure.I2C_Mode = I2C_Mode_I2C; I2C_InitStructure.I2C_DutyCycle = I2C_DutyCycle_2; I2C_InitStructure.I2C_OwnAddress1 = 0x40; I2C_InitStructure.I2C_Ack = I2C_Ack_Disable; I2C_InitStructure.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit; I2C_InitStructure.I2C_ClockSpeed = 40000; I2C_Init(I2C1, &I2C_InitStructure); }