This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PCF8574A IO Expander with nRF52-DK

Hi,

I'm trying to use PCF8574A IO Expander with a nRF52-DK board to display characters on an HD44780 LCD. I noticed that I have to use the function nrf_drv_twi_tx(). Since PCF8574A doesn't have a register address, how do I send commands and text to the LCD?

Thanks

Parents
  • The PCF8574A has an address, it has to have an address, it's an I2C device, I2C requires things to have an address. The address is whatever you set up on the A0-A2 pins.

    So you give the command the address of the expander and write a byte of data.

    I do have to ask however, since you have an nRF52 development kit which has masses of output lines just begging to be used, why do you need a port expander? Port expanders are for arduinos which come with about 1 1/2 pins available.

  • I couldn't get my code to work. It compiles and loaded on the board, but doesn't do anything.

    First thing I wanted to double check, can I power both the PCF8574A IO Expander and HD44780 LCD through VSHLD(3.3V) pin of the nRF52-DK board? If I have to run HD44780 LCD from a 5V supply, then can I use something like BSS138 MOSFETs to level shift my I2C line from 3.3V to 5V?

    Also, do I need to use 10K pull up resistors on the I2C line?

Reply
  • I couldn't get my code to work. It compiles and loaded on the board, but doesn't do anything.

    First thing I wanted to double check, can I power both the PCF8574A IO Expander and HD44780 LCD through VSHLD(3.3V) pin of the nRF52-DK board? If I have to run HD44780 LCD from a 5V supply, then can I use something like BSS138 MOSFETs to level shift my I2C line from 3.3V to 5V?

    Also, do I need to use 10K pull up resistors on the I2C line?

Children
No Data
Related