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.


Topics - OS

Pages: [1]
1
OLEDs / NHD-0220CW-AG3 Character set
« on: March 28, 2017, 02:49:57 AM »
Hello.
We are using a NHD-0220CW-AG3 (in 4-bit Parallel 6800 interface) with the character set of ROM C.
Is it possible to overwrite the first 8 character of ROM C to add individual character?

I tried it in this way, but did not succeed. I only got strange signs on the display.

Code: [Select]

void data_write (uchar c)
{//high byte
  PORTA = (c & 0xF0);
  DC_HIGH;
  RW_HIGH;
  E_HIGH;
  wait(LCD_WAIT);
  E_LOW; //data latched
 
  //low byte
  PORTA = (((c & 0x0F) << 4));
  DC_HIGH;
  RW_HIGH;
  E_HIGH;
  wait(LCD_WAIT);
  E_LOW; //data latched
}

void command (uchar c)
{//high byte
  PORTA = (c & 0xF0);
  DC_LOW;
  RW_LOW;
  E_HIGH;
  wait(LCD_WAIT);
  E_LOW; //data latched
 
  //low byte
  PORTA = (((c & 0x0F) << 4));
  DC_LOW;
  RW_LOW;
  E_HIGH;
  wait(LCD_WAIT);
  E_LOW; //data latched
}

set_newCharToFont(void)
{
  command(0x40); //0x40 -> pos of first char in CGRAM
  data_write(0x08); //1   8
  data_write(0x10); //2   10
  data_write(0x08); //3   8
  data_write(0x00); //4   0
  data_write(0x05); //5   5
  data_write(0x07); //6   7
  data_write(0x05); //7   5
  data_write(0x00); //8   0
}

void show_char(uchar num)
{
  command(0x01); //clear display
  command(0x02); //return home
  data(num); //1 -> Read data in ROM C at pos num
}


in main.c:

set_newCharToFont();
show_char(0);



One more question:
If we need more than 8 new character in the font, would it be possible to get a display with a customized software, which contains the needed characters?

Best regards,
OS

2
OLEDs / 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.

Pages: [1]