Newhaven NHD-2.23-12832UCY3-2 OLED Display

WORK IN PROGRESS

This is a running information of information from the datasheets for my project.
You're welcome to follow along, but it is by no means complete.
The module is an OLED display, which I'm attempting to setup via a I2C interface.
The reason for I2C bus interface selection is that it only requires 6 pins, consisting
of: 2 pins I2C, 2 pins mode select, 1 pin reset, 1 pin address select

Device

MFG: Newhaven Display
MFG P/N: NHD-2.23-12832UCY3
Desc: OLED Displays OLED 128 x 32 Yellow 63.2 x 43.1 x 6.0
Module Datasheet: link
Onboard Controller Datasheet: link

Electrical Information

VDDmin: 2.4v
VDDmax: 3.5v
IDDtyp: 180uA (logic)
ICCtyp: 28mA (display 100% on)

Pinout

Display Pinmbed PinDescription
11VSS/Ground
240VDD/3v Supply
426SA0/Slave Address Selection signal
51VSS/Ground
61VSS/Ground
727SCL/I2C Clock - Pull up to VDD
828SDAin/I2C Data - Pull up to VDD
928SDAout/I2C Data
101VSS/Ground
111VSS/Ground
121VSS/Ground
131VSS/Ground
141VSS/Ground
1625!RES/Active LOW Reset
171VSS/Ground
1924BS2/MPU Interface Select signal
2023BS1/MPU Interface Select signal

MPU Interface Summary

Onboard SSD1305 consists of 8 data and 5 control pins
Layout specifically for I2C Bus Interface

D7 - Tie LOW
D6 - Tie LOW
D5 - Tie LOW
D4 - Tie LOW
D3 - Tie LOW
D2 - SDAin - Pull up to VDD
D1 - SDAout - tie to SDAin for SDA, or NC to ignore ACK
D0 - SCL - Pull up to VDD
E - Tie LOW
R/W - Tie LOW
!CS - Tie LOW
D/C - SA0
!RES - !RES

Application Notes

For pull up resistors, I had some 3.9k5% laying around.

MCU I2C Interface

  • Must recognize SD0 before transmitting or receiving any information on I2C bus.
  • Will respond to slave address following by slave address bit, and r/w select bit
  • Response format: b7 b6 b5 b4 b3 b2 b1 b0 : 0 1 1 1 1 0 SA0 R/W#
  • 0111100 or 0111101 can be selected as slave address of SSD1305
  • R/W# bit is used to determine operation mode of I2C interface 1=read 0=write
  • SDA pins cannot output logic 0
  • SDAout may be NC, ack will be ignored
  • Transmission of information is followed by a clock signal on SCL
  • Each bit takes place during a single clock period of SCL

I2C Write Data

Slavem>=0words1 byten>=0bytes
S011110(SA0)(R/W)(ACK)(Co)(D/C)( )(5b control byte)(ACK)( )(7b data byte)(ACK)(Co)(D/C)( )(5b control byte)(ACK)( )(7b data byte)(ACK)P

Co: Continuation bit
D/C: Data/Command selection bit
ACK: Acknowledgement
SA0: Slave address bit
R/W: Read Write selection bit
S: Start condition
P: Stop condition

  1. Master device initiates data communication by a start condition. Established by pulling SDA to LOW while SCL stays HIGH.
  2. Slave address follows start condition for recognition. Slave address is either b0111100 or b0111101.
  3. Write mode is established with R/W bit to logic 0
  4. ACK will be generated after receiving one byte of data, including slave address and R/W bit.
  5. After transmission of slave address, either the control byte or the data byte may be sent across SDA.
    1. Control byte consists of Co and D/C bits followed by six 0's
    2. If the Co bit is 0, the transmission of following information will contain data bytes only
    3. The D/C bit determins the next data byte as command or data. 0=command, 1=data to be stored in GDDRAM.
    4. GDDRAM Pointer increases automatically after each write.
  6. Ack will be generated after receiving each control or data byte
  7. Write will finish when stop condition is applied. Established by SDAin from LOW to HIGH while SCL stays HIGH.

Command Decoder

If D/C pin (connected to SA0) is HIGH, data is interpreted as data display data written to GDDRAM. If D/C pin (connected to SA0) is LOW, data is interpreted as a command, written to command register.

Reset Circuit

When RES is LOW, the chip is initialized with status:

  1. Display OFF
  2. 132x64 display mode
  3. Normal segment and display data column address and row address mapping (SEG0=00h, COM0=00h)
  4. Shift register data clear
  5. Display start line is set to RAM address 0
  6. Column address counter is set to 0
  7. Normal scan direction of COM outputs
  8. Contrast control register is set at 80h
  9. Normal display mode (A4h command)

Power ON sequence

  1. VDD power on
  2. Set RES to LOW for at least 3us then HIGH
  3. Send command 0xAF for diaplay ON, SEG/COM will be ON after 100ms

Power OFF sequence

  1. Send command AEh for display OFF
  2. Power OFF VDD


7 comments on Newhaven NHD-2.23-12832UCY3-2 OLED Display:

07 Dec 2011

Hello,

i'm looking for a driver for SSD1305 with densitron display. Is your driver already working? if so can you publish it?

thanks in advance

14 Feb 2012

Any luck?

I am using the MCOG022BW128064SY which uses the SSD1305 driver as well. I have SA0 pulled to ground, I also pull RES# from high to low to high to reset the system. Whenever I use the I2C library of mbed, something like this:

#include "mbed.h"

I2C i2c(p9, p10);
Serial pc(USBTX, USBRX);

int main() {
    i2c.start();
    if (i2c.write(0x78)){
        pc.printf("ACK\r\n");
    } else {
        pc.printf("NACK %d\r\n", 0x78);
    }
    while(1){
        //nop
    }
}

This code always returns with NACK...

So any luck?

Greets from Dais.

14 Feb 2012

You need to connect SDAin to SDAout to get an ACK. You need to tie BS1 and BS2 to the correct levels to enable the I2C mode: BS1=1, BS2=0. Some other pins need to be grounded (see page 6 of datasheet).

Doesnt make sense to connect BS1, BS2 and SA0 to mbed port pins. These inputs should be connected permanently to either GND or 3V3. No need to change these levels through some mbed pin.

The datasheet does state that the ACK may not work due to circuit properties. That may happen when your I2C pullup Rs have relatively low resistance. Try several K ohms.

15 Feb 2012

Thank you for your reply Wim, I had SDAin and SDAout connected together and had 10k ohm pull-ups. Then later I figured that you need to set BS1 and BS2, which I wanted to set them to I2C using 3v3 or gnd. But...

The place I bought from: Farnell link:http://nl.farnell.com/midas/mcog022bw128064sy/oled-128x64-grn-on-blk-sun-read/dp/2063155?in_merch=New%20Products&in_merch=Nieuwe%20producten&MER=i-9b10-00002068

The datasheet MIDAS manufacturer made: [[Datasheet: ]]http://www.farnell.com/datasheets/1485429.pdf

Look at page 10 of the datasheet, the one I bought from already has a small board with that circuit, its SMD. They have BS1 and BS2 set on VDD which means MIDAS forces me to use 8080 mode... guess I'll continue with parallel I guess. Because I really don't want to solder those small parts.

mvg,

Dais

15 Feb 2012

OK, seems the boards default setting is 8080. Inspect the circuitboard, maybe you are lucky and there are solderbridges to connect BS1, BS2 to either VDD or GND.

03 Apr 2015

Hi, I am having some trouble bringing up my NHD 2.23 display. It wont talk to the I2C interface. I want to know the following: Do you have to initialize the module fully as in the datasheet just to turn the device ON?

Typically when you write to the I2C slave device, you send the Device address, Register address or Control Bits and then the data or for commands you just send the Address and Command. I have trouble following the datasheet for the actual commands to send. How do you know which one of the functions need a command only and which ones need command and data.

Would it be a problem if you had your SA0 or D/C pulled low all the time since the address is fixed.

any help will be appreciated.

04 Oct 2016

Hi, I hope not late at all.

san jay wrote:

Hi, I am having some trouble bringing up my NHD 2.23 display. It wont talk to the I2C interface. I want to know the following: Do you have to initialize the module fully as in the datasheet just to turn the device ON?

Yes, you have. On the other hand, which board do you use to handle it?

Please log in to post comments.