Graphics mode CFAG12832A st7920 controller

drew30

New member
Hi, does anyone have any ideas on what I may doing wrong? I am using the crystafontz CFAG12832A with st7920 controller, whenever I enable the graphics mode all I get is garbage on the screen and I can't seem to write to or clear the screen in graphics mode. It would be greatly appreciated I have been able to follow the data sheet only to get the characters in basic mode but my goal is to use only graphics? Thanks
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

CF Support

Administrator
Here's some code that should work for initializing that display:

Code:
  //Talk to the control register.
  CLR_RS;

  //Function Set
  DATA(0x30);
  SET_E;
  Sleep(0);
  CLR_E;

  Sleep(1);


  //Display on
  DATA(0x0C);
  SET_E;
   Sleep(0);
 CLR_E;

   Sleep(1);

  // Clear display
  DATA(0x01);
  SET_E;
  Sleep(0);
  CLR_E;

  Sleep(1);

  //Set Entry mode
  DATA(0x06);
  SET_E;
  Sleep(0);
  CLR_E;
  Sleep(1);

// end initialization
	SET_RS;

  // Set Extended function set
	CLR_RS;
  DATA(0x30);
  SET_E;
  Sleep(0);
  CLR_E;

  DATA(0x32);
  SET_E;
  Sleep(0);
  CLR_E;

  DATA(0x36);
  SET_E;
  Sleep(0);
  CLR_E;
The timings may need to be changed, but the order is correct.
 

drew30

New member
Thank You very much for the info, I have been able to write to the display, now I guess I need to work on building my own library
 
Top