- Thu Oct 13, 2011 1:52 am
#134572
I'm trying to initialize this (http://www.sparkfun.com/products/9052) display in 4-bit mode.
Has anybody gotten this display working, and if so was there anything in the datasheet that wasn't 100% documented for init?
Here is what I have now: http://www.youtube.com/watch?v=QEqqdGL_X0k
I'm holding reset on power to prevent initialization, resetting runs the init function over.
I've noticed in the 4-Bit init drawing the function set N and F bits are not in the correct position (Function set description and 8-bit init have them in B2 and B3 while the 4-bit has them in B0 and B1).
Here is how I'm initializing:
1.) Wait 30ms
2.) Set pins to 0011
3.) toggle E
4.) Wait 5ms
5.) toggle E
6.) Wait 200us
7.) toggle E
8.) Wait 200us // I'm not sure if this is needed
9.) toggle E
/* All writes below check busy flag before toggling e */
10.) 0010 1000 // Function set ---- according to init table this should be 00100010?
11.) 0000 1000 // Display off
12.) 0000 0001 // Clear
13.) 0000 0110 // Entry Mode, Increment enabled
/* Display should be initialized now */
14.) 0000 1110 // Display on, cursor enabled
I'm driving it from the msp430 launchpad and VCC is 3.5V
Has anybody gotten this display working, and if so was there anything in the datasheet that wasn't 100% documented for init?
Here is what I have now: http://www.youtube.com/watch?v=QEqqdGL_X0k
I'm holding reset on power to prevent initialization, resetting runs the init function over.
I've noticed in the 4-Bit init drawing the function set N and F bits are not in the correct position (Function set description and 8-bit init have them in B2 and B3 while the 4-bit has them in B0 and B1).
Here is how I'm initializing:
1.) Wait 30ms
2.) Set pins to 0011
3.) toggle E
4.) Wait 5ms
5.) toggle E
6.) Wait 200us
7.) toggle E
8.) Wait 200us // I'm not sure if this is needed
9.) toggle E
/* All writes below check busy flag before toggling e */
10.) 0010 1000 // Function set ---- according to init table this should be 00100010?
11.) 0000 1000 // Display off
12.) 0000 0001 // Clear
13.) 0000 0110 // Entry Mode, Increment enabled
/* Display should be initialized now */
14.) 0000 1110 // Display on, cursor enabled
I'm driving it from the msp430 launchpad and VCC is 3.5V