Changing the Slave Address with NHD-0420D3Z!
Hello, I am working on a project in which I run two of the specified character LCD displays on a single I2C bus as slaves. The master/controller in this scenario is a KL25z Freedom Platform. I've been able to successfully write text to the LCD, move the cursor around, and execute several of the commands specified in the data sheet. However, in order for my project to work, I need to be able to talk to one LCD and not the other. Obviously, I should just change the I2C slave address of one of the two LCDs. However, when I execute the command specified in the data sheet, nothing happens and the display still responds to the default address. Has anyone had this issue or know what might be wrong?
-
The execution time for the command to change the I2C address is longer than the other commands (3ms). See the table on page 7 of the datasheet. Please make sure you are allowing for this :)
0 -
Haha oh wow I feel silly. I did initially note that this command needed a longer delay. When I went back to check my code it turns out I was only delaying for about 2 ms given the clock rate of my controller. Increasing the delay has done the trick and everything works great, thanks Michael!
0
Please sign in to leave a comment.
Comments
2 comments