2013-03-20 12:14 PM
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) #stm32f103rb-i2c-pcf8574p-keypad2013-03-20 03:08 PM
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); }