Digole
©DIGITAL
SOLUTIONS

Serial Display emulator    New Display User manual

Forum login or
Login:
Password:
  
Forum Catagory
Digole Serial Display (210)
  12864 LCD/OLED module (23)
  24064 LCD module (3)
  Color LCD Modules (29)
  Color OLED module (20)
  Online Emulater (5)
  Universal GLCD module (1)
  Universal Text LCD module (2)
Mini Display Panels (0)
  Mini LCDs (0)
  Mini OLEDs (0)
Pattern Drive Module (0)
~Buy & Sell on Digole (2)
~Others~ (5)
Forum : Digole Serial Display : 12864 LCD/OLED module :

 Search Forum.. 
 Creat New Topic   Reply 

PIC16f877A

 Please can anyone help me get started with displaying anything on the digole 12864ZW.

I have been trying for months now to get the display to show anything from the CGRAM or GDRAM to no avail.
I'm using MPLABX XC8 compiler and the Hobby components PIC16f877A development board

I'm using 8bit parallel mode (basic instr set for CGRAM characters) (extended instr set for GDRAM)
the Data port is portD and RS, RW, EN use portE RE0, RE1 and RE2 respectively.

Up to now all I have been able to display is the odd fleeting ASCII character and more often just a random set of flashing blocks on the screen.

I have tried all kinds of delays and timings. Also I don't seem to be able to read the busy flag, I always find it in the not busy state '0'

RE:PIC16f877A

char DATA_TAB[1024];  //screen buffer
 
void InitLCD_ST7920(void) {
        unsigned char x, y;
        Delay_us(20);
        Ssd_Command(0x30); //basic mode, 8bit interface
        Ssd_Command(0x0C); //LCD on
        Ssd_Command(0x01); //Display clear TEXT
        Ssd_Command(0x02); //Return to home
        Ssd_Command(0x36); //Graph Mode 8bit interface, graph on
        for (y = 0; y < 32; y++) //clear graphic RAM
        {
            Ssd_Command(0x80 | y); //y
            Ssd_Command(0x80); //x
 
            for (x = 0; x < 32; x++) {
                Ssd_Data(0);
            }
        }
    }
 
    void freshscreen_ST7920(void) {
        volatile unsigned int ptr;
        ptr = 0;
        Ssd_Command(0x36); //Graph Mode 8bit interface, graph on
        for (unsigned char i = 0; i < 32; i++) {
            Ssd_Command(0x80 + i); //set low column address
            Ssd_Command(0x80); //set high column address 10
            for (char j = 0; j < 16; j++) {
                Ssd_Data(DATA_TAB[ptr++]);
            }
        }
        for (char i = 0; i < 32; i++) {
            Ssd_Command(0x80 + i); //set low column address
            Ssd_Command(0x88); //set high column address 10
            for (char j = 0; j <16; j++) {
                Ssd_Data(DATA_TAB[ptr++]);
            }
        }
    }
 

RE:PIC16f877A

Or you can use our Universal adapter to drive the display:

http://www.digole.com/index.php?productID=1269

Copyright Digole Digital Solutions/Digole Technologies Inc., 2008-2024. All rights reserved.
Powered by Digole