Placing the image in the upper left corner
glcd_cursor_x=1; glcd_cursor_y=1; for(v=0; v<66; v++){ for(h=0; h<60; h++){ z = (int16)(v) * 60 + (int16)(h); LCD_pixel_write8(h, v, penguin[z]); } }
some sample text
glcd_cursor_x=1; glcd_cursor_y=100; glcd_color=_RED; printf(glcd_putc, "ABCDEFGHIJKLMOPQRSTUVWXYZ");
making some sine waves
for(fx=0;fx<=129;fx=fx+1){ fy=((sin(fx/10 )*20)+ 64) ; LCD_pixel_write8((int8)(fx), (int8)(fy),_BLUE); fy=((sin(fx/10+128)*20)+ 64); LCD_pixel_write8((int8)(fx), (int8)(fy),_GREEN); fy=((cos(fx/10 )*20)+ 64); LCD_pixel_write8((int8)(fx), (int8)(fy),_RED); fy=((cos(fx/10+128)*20)+128)/2; LCD_pixel_write8((int8)(fx), (int8)(fy),_YELLOW); }
drawing a thin blue line (it's on the bottom)
for(n=10;n<120;n++){ LCD_pixel_write8(n,130,_BLUE); }
displaying text from the serial port
glcd_cursor_x=1; glcd_cursor_y=1; glcd_color=_BLUE; while(1){ glcd_putc(getc()); }
The full source code: glcd.zip
Visual Basic utility for creating image arrays: array_creator11.zip