NHD-0220CW: cursor not visible with text
Hello.
It is my first OLED charakter display. I can turn on the cursor an move it to left and right. But when I send text, the cursor is not visible anymore. Is this correct?
Thanks.
-
The cursor should still be able to show up.
Would you be able to tell me what settings you have for the Display On/Off register?0 -
Hello.
In the init function it is " command(0x0C); //fund. com. set: display ON:0C".
Later I send command(0x0E) for turning the cursor on. That works fine.
Moving the Cursor with command(0x14) works also fine.
When I call the function send_output(); the text is visible but the cursor disappeared.void send_output(void)
{
uint i=0;
//command(0x01); //clear display
command(0x02); //return home
for(i=0;i<20;i++)
{
data(Line1[i]); //write Line1
}
command(0xC0); //line 2
for(i=0;i<20;i++)
{
data(Line2[i]); //write Line2
}
}This is the hole init function:
E_LOW; //RES_HIGH; //RES = 1; //reset HIGH – inactive
wait(LCD_WAIT);//delayms(1); //delay
command(0x2A); //fundamental command set: function set: RE ON
command(0x71); //extended command set: function selection A
data(0x00); // disable internal VDD regulator (2.8V I/O). data(0x5C) = enable regulator (5V I/O)
command(0x28); //fundamental command set: function set:RE OFF
command(0x08); //fund. com. set: display: display off, cursor off, blink off
command(0x2A); //fundamental command set: function set: RE ON
command(0x79); //extended com. set: OLED: "OLED command set" enabled (S.10)
command(0xD5); //OLED command set: set display clock divide ratio/oscillator frequency
command(0x70); //value: set display clock divide ratio/oscillator frequency
command(0x78); //extended com. set: OLED: "OLED command set" disabled
command(0x08); //(RE ON)fund.com. set: extended function set: 5-dot,no inverting of corsor,2-lines)
command(0x06); //(RE ON)fund.com. set: COM SEG direction
command(0x72); //ext. com.set: function selection B
data(0x00); //selectROM A, CGRAM
command(0x2A); //fundamental command set: function set: RE ON
command(0x79); //extended com. set: OLED: "OLED command set" enabled (S.10)
command(0xDA); //OLED command set: set SEG pins hardware configuration
command(0x10); //set SEG pins hardware configuration
command(0xDC); //OLED command set: function selection C
command(0x00); //function selection C: internal VSL + GPIO input disabled
command(0x81); //OLED command set: set contrast control
command(0xf0); //set contrast control: 0xf0
command(0xD9); //OLED command set:set phase length
command(0xF1); //set phase length: 0xf1
command(0xDB); //OLED command set: set VCOMH deselect level
command(0x40); //set VCOMH deselect level
command(0x78); //extended com. set: OLED: "OLED command set" disabled
command(0x28); //fundamental command set: function set:RE OFF
command(0x06); //fundamental command set: cursor/blink moves right //BPIE
command(0x01); //fund. com. set: clear display
command(0x80); //fund. com. set: set DDRAM address to 0x00
command(0x0C); //fund. com. set: display ON:0C
wait(LCD_WAIT);//delayms(100); //delay0 -
Hello.
One more notice: When I send command(0x01) to clear the display, the text is erased but the cursor is visible again (at first position).
What am I doing wrong?0 -
Hi again.
I think my problem is done. It seams as if I had a wrong idea of how the cursor works.
It is not possible to show a character and a cursor at one position at the same time, is this correct?
Kind regards.0 -
Ok, I found out a new thing: it is possible to show a character and a cursor at one position at the same time.
But one more question: Is it possible to deactivate the auto increment of the cursor? I want to move the cursor independet from the characters written.
Thanks.0 -
Hello,
Good to see you've got it.
Unfortunately it is not possible to disable the cursor moving either left or right after printing a character. You would need to manually set the address to the desired location and rewrite the character printed where you need it.
This controller will allow you to increment or decrement the address counter after printing a character.0
Please sign in to leave a comment.
Comments
6 comments