• We recently switched our forum platform. If you experience any issues please email support@crystalfontz.com

CFAG12864BTMIV GLCD Question

Mad_D

New member
Hi!

I have the GLCD conected to a Atmel AVR ATmega32 Microcontroller. I created a basic character library.


I have trouble understanding the following instruction.

Display Start Line:
Z address AAAAAA ( binary ) of the display data RAM is set in the display start line
register and displayed at the top of the screen. Figure 2. shows examples of display ( 1/64 duty
cycle ) when the start line = 0-3. When the display duty cycle is 1/64 or more ( ex. 1/32, 1/24
etc. ), the data of total line number of LCD screen, from the line specified by display start line
instruction, is displayed


Is there a special initializing sequence to the GLCD?

I can display charactes on the top left corner row. Which I believe is starting from X-address = 0 and Y-address = 0 and ends at X-address = 0 and Y-address = 63. I can't get anything to display outside.
ex. when X-address = 5 or (CS2 = 0 and CS1 = 1)

Thanks.
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

CF Tech

Administrator
Take a look at "CFAG_WinTestDlg.cpp" from "CFAG12864B_WinTest.zip" linked in this thread.

Then look for "CCFAG_WinTestDlg::OnInitialize()" which has this sequence in it:
Code:
  //Reset is an R-C in the hardware.
  //R/W is set permanently low in the hardware (write-only)

  //These things prety much initialize themselves

  //Idle E
  CLR_E;

  //Talk to the control register.
  CLR_RS;

  //Talk to both controllers
  CLR_CS1;
  CLR_CS2;

  //Display on
  DATA(0x3F);
  SET_E;
  CLR_E;
  Sleep(10);

  //Set Start Line 0
  DATA(0xC0);
  SET_E;
  CLR_E;
  Sleep(10);

  int
    row;
  for(row=0;row<=7;row++)
    {
    //Set X address
    DATA(0xB8|row);
    SET_E;
    CLR_E;
    Sleep(1);

    //Set Y address 0
    DATA(0x40);
    SET_E;
    CLR_E;
    Sleep(1);

    //Aim at the data register.
    SET_RS;

    //Talk to controller 1 only
    SET_CS1;

    int
      col;
    for(col=0;col<=63;col++)
      {
      FDATA(cfag12864b[row][col]);
		  SET_E;
      Sleep(1);
		  CLR_E;
      Sleep(1);
      }

    //Talk to the controller 2
    CLR_CS1;
    SET_CS2;

    for(col=64;col<=127;col++)
      {
      FDATA(cfag12864b[row][col]);
		  SET_E;
      Sleep(1);
		  CLR_E;
      Sleep(1);
      }
    
    //Talk to both controllers
    CLR_CS1;
    CLR_CS2;

    //Aim back to the control register.
    CLR_RS;
    }
 
Top