Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - signalflow

Pages: [1]
1
OLEDs / OLED Initialization - NHD-0420DZW-AB5
« on: February 18, 2016, 12:52:58 PM »
Hi, I have been struggling with initializing the OLED NHD-0420DZW-AB5 correctly using the default 8-bit (6800 parallel interface).

I looked at the code supplied by newhaven for 8-bit given at the thread below:
http://www.newhavendisplay.com/NHD_forum/index.php/topic,1005.0.html
which initializes with

void init(){
   E = 0;
   Delayms(5);
   command(0x30);  //0x30
   Delayms(100);
   command(0x30);  //0x30
   Delayms(10);
   command(0x30);  //0x30
   Delayms(10);
   command(0x38);  //func set 8-bit
   command(0x10);  //cursor/disp shift left
   command(0x0c);  //Display ON
   command(0x06);  //Entry mode set
}

This does not match what the datasheet says on pg. 20 which would be something like shown below but I put a delayms(10) at the end of the command() function instead of checking Busy flag.

void init(){
   E = 0;
   Delayms(5);
   command(0x38);  //func set 8-bit
   Delayms(100);

   command(0x08);  //Display OFF
   command(0x01);  //Clear display
        command(0x06);  //Entry mode set
   command(0x02);  //HOME
   command(0x0C);  //Display ON
}

Neither of these types of initialization work.  Do we need the three dummy function sets at the beginning (0x30)?  It just seems like the datasheet almost gets you there, but leaves out some required commands for initalization and timing.  For example, the datasheet says power on and wait >1ms although your example code above shows it waiting 100 ms.  It's really easy to get an HD44780 to work, but this has been extremely challenging.  Any help appreciated and once we figure out how to initialize the display properly, then please update the datasheet.

Thanks.

Pages: [1]