Newhaven Products > OLEDs

NHD-0216AW-IB3 I2C help

(1/1)

sweit:
Hello,

I'm trying to interface an NHD-0216AW-IB3 to a dsPIC30F4013. This is the first time I've ever used the I2C interface and I have a question. In the initialization, do I need to send a start and stop condition before every command and data byte? Also, do I need to send the device address before every command and data byte?

Thank you,
Steve

Saurabh_B:
Hello,

You would only need to send the start condition once, and you would only need to send the address once after this start condition.

You will however need to send a "command byte" between each data byte sent. I would recommend looking at Figure 5-7 of the Controller datasheet.
This can be found on page 11 here: http://www.newhavendisplay.com/app_notes/US2066.pdf

This command byte would need to be sent between any instruction/data byte sent to the display, and it allows you to change the D/C# bit which determines whether the following byte that follows will be used as data or an instruction.

Navigation

[0] Message Index

Go to full version