/*/////////////////////////////////////////////////////////////// This is a test program for using a SantechDisplay SD-G12864. (128*64 dots Graphic STN-LCD Module) The Samsung Contoroller KS0108 is mounted on this LCM. The SD-G12864 is 128 pixles across and 64 pixels down. The driver treats the upper left pixel as (0,0). Fuction Liblaly: GLCD.C C-compier: CCS PCM CPU: PIC 16F887 on 44-pin Demo Board Programmer: PicKit2 ////////////////////////////////////////////////////////////////*/ #include <16F887.h> #use delay(clock=8000000) #fuses INTRC_IO, NOWDT, PUT, NOPROTECT, NOBROWNOUT #use fast_io(c) #use fast_io(d) #include "GLCD.C" //Text Table char TextA[] = "Santech Display"; char TextB[] = "SD-G12864A"; ////////////////////////////////////////////////// void main() { set_tris_c(0x00); // graphic lcd control lines all output set_tris_d(0x00); //Set PortD to output glcd_init(ON); while(1) { glcd_text57(0, 0, TextA, 1, ON); //Write TextA glcd_text57(0, 10, TextB, 2, ON); //Write TextB delay_ms(500); glcd_line(32, 32, 127, 63, ON); //Draw 1 line. delay_ms(500); glcd_rect(10,40,20,60,YES,ON); //Draws a rectangle delay_ms(500); glcd_bar(30,40,50,60,5,ON); //Draws a bar (wide line) delay_ms(500); glcd_circle(70,40,10,NO,ON); //Draws a circle delay_ms(1000); glcd_fillScreen(OFF); //Display clear delay_ms(500); bitmap_write(); //Bitmap file (Japanese Poem) delay_ms(3000); glcd_fillScreen(OFF); //Display clear delay_ms(500); } }