1
OLEDs / NHD0420CW-A*3 tHREE LINE MODE, MIDDLE LINE DOUBLE HEIGHT
« on: April 12, 2015, 11:58:47 PM »
Well, learned more but really having trouble figuring out the command structure. And have a display lash up on the desk, and keep fiddling with codes and cannot seem to figure out the three line mode with the two middle lines of the display serving as one double height line. I think, but not certain, that I just cannot figure out how to manipulate the IS and RE bits. And when I try what I think should work, it doesn't.
Has anybody been able to do this? I stumbled into it by accident, thought I had it, but as soon as I power cycled the thing it went to plain old 3 line mode. If I hit Arduino reset it comes back where I want it. What I'm looking to do is exactly as shown in the US2066 data page 37 table 7-2, second image down.
Then there is the table in 7-1 where the UD1 bit is shown as 1 for what I'm looking to do. But the instructions clearly states just above the images that UD1=0 is forbidden in 3 line mode. the first image shows UD1=0, and it is a 3 line display.
As I manipulate these bits I never see a particular bit doing what is shown in this data.
My code:
#include "Wire.h"
#include "OLedI2C.h"
#include "SoftReset.h"
OLedI2C LCD;
void setup()
{
Wire.begin();
LCD.init();
}
void loop()
{
/////LCD.sendCommand(B00101010);
LCD.sendCommand(B00101100); //0100 and 1100 wok
/////LCD.sendCommand(B00101110);
//LCD.sendCommand(B00101000);
// LCD.sendCommand(B00101010);
//LCD.sendCommand(B00010000);
/////LCD.sendCommand(B00101010); //function setset re=1 is=0 3/4 line"
/////LCD.sendCommand(B00101110);
//LCD.sendCommand(B00001001); //display on
LCD.sendCommand(B00101010);
LCD.sendCommand(B00010101); //3 line format if is=0 & re=1
//LCD.cursPos(1,0);
//LCD.sendData(00);
delay(100);
LCD.sendString("FREQ USB NB SQ ",0,0);
LCD.sendString("14.300.00 ",0,1);
LCD.sendString("RXTX BAND SQ DSP >",0,2);
//LCD.sendString("04",0,3);
while(1);
}
_______________________________________________
Anything like a command cheat sheet?
Thanks, everyone.
GeorgeC
Has anybody been able to do this? I stumbled into it by accident, thought I had it, but as soon as I power cycled the thing it went to plain old 3 line mode. If I hit Arduino reset it comes back where I want it. What I'm looking to do is exactly as shown in the US2066 data page 37 table 7-2, second image down.
Then there is the table in 7-1 where the UD1 bit is shown as 1 for what I'm looking to do. But the instructions clearly states just above the images that UD1=0 is forbidden in 3 line mode. the first image shows UD1=0, and it is a 3 line display.
As I manipulate these bits I never see a particular bit doing what is shown in this data.
My code:
#include "Wire.h"
#include "OLedI2C.h"
#include "SoftReset.h"
OLedI2C LCD;
void setup()
{
Wire.begin();
LCD.init();
}
void loop()
{
/////LCD.sendCommand(B00101010);
LCD.sendCommand(B00101100); //0100 and 1100 wok
/////LCD.sendCommand(B00101110);
//LCD.sendCommand(B00101000);
// LCD.sendCommand(B00101010);
//LCD.sendCommand(B00010000);
/////LCD.sendCommand(B00101010); //function setset re=1 is=0 3/4 line"
/////LCD.sendCommand(B00101110);
//LCD.sendCommand(B00001001); //display on
LCD.sendCommand(B00101010);
LCD.sendCommand(B00010101); //3 line format if is=0 & re=1
//LCD.cursPos(1,0);
//LCD.sendData(00);
delay(100);
LCD.sendString("FREQ USB NB SQ ",0,0);
LCD.sendString("14.300.00 ",0,1);
LCD.sendString("RXTX BAND SQ DSP >",0,2);
//LCD.sendString("04",0,3);
while(1);
}
_______________________________________________
Anything like a command cheat sheet?
Thanks, everyone.
GeorgeC