We now want to use COL7 as gpio mode, but after I configure the register of 0x1E, the status of the register of 0x15 is not correct. We connected a pull-up resistor to COL7
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
We now want to use COL7 as gpio mode, but after I configure the register of 0x1E, the status of the register of 0x15 is not correct. We connected a pull-up resistor to COL7
The value read out is 0xff, we used COL1-4, COL5-7 is not used, connected to the pull-up resistor, ready to be used as a gpio, want to read the gpio status of COL7,For example, COL7 is currently in the pull-up state, and the read state should be 1, if the pull-up resistor is not connected, the read state should be 0
This configures the first eight columns for keypad mode. To get GPIOs, set 0x1E to 0x00.
we used COL1-4, COL5-7 is not used, connected to the pull-up resistor, ready to be used as a gpio, want to read the gpio status of COL7,For example, COL7 is currently in the pull-up state, and the read state should be 1, if the pull-up resistor is not connected, the read state should be 0,If we want this result, what should we do
Clear the corresponding bits in the KP_GPIOx registers. (This is the default.) Clear the corresponding bits in the GPIO_DIRx registers. (This is the default.)
How do I clear this? What should I do after clearing? How can I read COL7 when used as a gpio. If the hardware is connected to a pull-up resistor, the read is 1 and the ground read is 0. Which register is used to read
These bits are cleared by default; you do not need to do anything. (But you can write a zero to these registers.)
To read the current state of the COL0..7 pins, read register 0x15.
Are you sure that your I²C communication works correctly? Does your code check for NACK? When you read register 0x1E after powering up, is it zero?
I used to write the value to register 0x1E when the driver was just loaded. I also read it and it was written in. I2c was for communication. I read the 0x15 register but it was 0x00.
I also tried to write the 0x24 register as output to read, but the result is still the same as 0x00