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 - dreiss

Pages: [1]
OLEDs / Shift position after "clear screen" instruction
« on: September 17, 2015, 12:30:54 AM »
On the NHD-0420CW, is the shift position expected to be restored to 0 when issuing a "clear screen" instruction (command 0x01)?  What about "return home" when the display is off (the "D" bit in the "Display ON / OFF Control" command)?  I'm seeing some very strange behavior.

After completely powering off the module (0 volts, all capacitors drained), I power it on and issue these commands:

Code: [Select]
// Set 4-line mode
// Display off
// Clear screen
// Display on
// Write two characters at current location.
// Move to second line and write two more characters.

I expect that all four characters will be on the left side of the screen (or right, because it is reversed), but instead I see them split: two on the left and two on the right.

This behavior is very fragile.  In *only* happens after a power-on.  After asserting the reset pin, the same command sequence gives the proper result.  Also, small changes to the code fix it.  For example, replacing the
Code: [Select]
command(0x08) with
Code: [Select]
0x08,0x0C,0x08 (display off, on, off) fixes it.  Issuing a
Code: [Select]
command(0x02) (return home) fixes it, but only if it is *after*
Code: [Select]

Can anyone else replicate this behavior?  I am using I2C.

OLEDs / Instruction execution time for slim OLEDs?
« on: September 17, 2015, 12:19:37 AM »
The datasheet for the NHD-0420DZW shows a maximum execution time for each instruction, but the datasheet for the NHD-0420CW does not?  Do I need to wait for instructions to be executed, or can I send new ones right away as long as I respect the timing diagram (I2C shows 1.3us minimum between transmissions)?

Pages: [1]