Dear Nordic Team,
Thanks for support.
I am using PCA10028 hardware, I want IO expander code for PCAL6408.
Dear Nordic Team,
Thanks for support.
I am using PCA10028 hardware, I want IO expander code for PCAL6408.
From looking at the PCAL6408A datasheet I see that it is controlled by I2C (TWI). We do not have any example of using that device specifically, but you can use the TWI master driver to communicate with it. The TWI Sensor Example has a practical example of using the driver. For the details of how to control the PCAL6408A, you have to refer to it's datasheet.
Thanks for answering. I want byte write and byte read function.
In order to read and write single bytes you specify a length of 1 in the calls to nrf_drv_twi_rx()
and nrf_drv_twi_tx()
. Refer to the API documentation for details.
Thanks for reply. I am going to use DS1307 RTC . I found one source file from internet. That file mainly contain 4 function.
I want replace these function. It is possible using below function?? nrf_drv_twi_rx(),nrf_drv_twi_tx(),nrf_drv_twi_enable(),nrf_drv_twi_disable();
Source file link:picmania.garcia-cuervo.net/.../_ds1307.c
That should be possible. Though I am not sure you gain much by adapting the code you refer to. It is anyway so few lines and a simple device, so I would think it was easier to implement something from scratch using our driver, perhaps looking at the file you refer to for inspiration (in addition to the datasheet).