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.


Messages - dreiss

Pages: [1]
1
OLEDs / Re: Shift position after "clear screen" instruction
« on: September 18, 2015, 02:39:23 PM »
The first code snippet is my initialization sequence.

2
OLEDs / Re: Shift position after "clear screen" instruction
« on: September 18, 2015, 02:45:34 AM »
This is what the code produces after a hard power off (which seems wrong):



This is what the modified code produces, or what the original code produces after asserting the reset pin:



I'm not concerned about the mirror-image effect.  I can fix that with the bidirection register.

3
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
command(0x3A);
command(0x09);
command(0x38);
// Display off
command(0x08);
// Clear screen
command(0x01);
// Display on
command(0x0C);
// Write two characters at current location.
data(0x30);
data(0x41);
// Move to second line and write two more characters.
command(0xA0);
data(0x32);
data(0x42);

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]
command(0x08).

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

4
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]