Author Topic: NDH-0220CW: cursor not visible with text  (Read 978 times)

OS

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
NDH-0220CW: cursor not visible with text
« on: December 05, 2016, 05:13:14 AM »
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.

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 341
  • Karma: 10
    • View Profile
Re: NDH-0220CW: cursor not visible with text
« Reply #1 on: December 05, 2016, 09:39:05 AM »
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?

OS

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Re: NDH-0220CW: cursor not visible with text
« Reply #2 on: December 06, 2016, 03:06:46 AM »
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 disapeared.

Code: [Select]
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:
Code: [Select]
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); //delay

OS

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Re: NDH-0220CW: cursor not visible with text
« Reply #3 on: December 07, 2016, 03:21:58 AM »
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?


OS

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Re: NDH-0220CW: cursor not visible with text
« Reply #4 on: December 07, 2016, 03:41:55 AM »
Hi again.

I think my problem is done. It seams as if I had a wrong idear 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.

OS

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Re: NDH-0220CW: cursor not visible with text
« Reply #5 on: December 07, 2016, 05:08:45 AM »
Ok, I found out a new thing: it is possible to show a character and a cursor at one position at the same time.  ;D

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.

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 341
  • Karma: 10
    • View Profile
Re: NDH-0220CW: cursor not visible with text
« Reply #6 on: December 07, 2016, 08:04:04 AM »
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.

 

NHD‐0420CW‐AG3: blinking part of text?

Started by RichardRBoard OLEDs

Replies: 2
Views: 2152
Last post February 28, 2017, 03:27:02 PM
by BobG
Text orientation not changing with Extended Entry Mode Set Register

Started by tekknojoeBoard OLEDs

Replies: 5
Views: 1268
Last post January 27, 2017, 10:13:57 AM
by jmadsenee
NHD-0216CW-AY3 8-bit Parallel 8080, Text on Display Issue

Started by forteyBoard OLEDs

Replies: 14
Views: 7071
Last post March 09, 2015, 02:23:51 PM
by Retheesh_M
MOVED: NHD-0420CW-AY3 display, text is mirror image

Started by Saurabh_BBoard Character LCDs

Replies: 0
Views: 1971
Last post March 11, 2016, 07:51:03 AM
by Saurabh_B
NHD-0420CW-AY3 display, text is mirror image

Started by zleozBoard OLEDs

Replies: 1
Views: 1825
Last post March 11, 2016, 07:59:53 AM
by Paul_B