Author Topic: NHD-0216AW-IB3 I2C help  (Read 130 times)

sweit

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
NHD-0216AW-IB3 I2C help
« on: October 18, 2017, 07:26:24 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: NHD-0216AW-IB3 I2C help
« Reply #1 on: October 18, 2017, 09:40:28 AM »
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.

 

NHD-0216AW-IB3 with Arduino Uno Code example?

Started by mproweBoard OLEDs

Replies: 9
Views: 2327
Last post June 06, 2017, 10:04:59 AM
by mprowe
How work with NHD-0216AW-SB3

Started by RacursBoard OLEDs

Replies: 1
Views: 704
Last post May 17, 2017, 04:30:14 PM
by Saurabh_B