/*
***********************************************************************************************
*						JHD12864G/J Graphical LCD Demo_1 (KS0107/8 controller)
*
* File name		: gLCD_STK1_Demo1.c
* Programmer 	: John Leung, TechToys. Hong Kong
* Web presence  : www.TechToys.com.hk
* Language		: Keil C 7.09 2K limited version in uVision2 IDE version 2.40
* Hardware		: AT89S52-gLCD-STK1 demo board
* Version		: Version 1.0
* Date			: 4th July 2006
***********************************************************************************************
*/
#include <regx52.h>
#include "delay.h"
#include "ks0108.h"
#include "usaflag.h"
#include "earth.h"

void main(void)
{
	unsigned char x;

	GDispInit();

	for(;;){
	GDispPixStrAt(50,32, "Temp: 25.5C", 1, BLACK);
	GDispPixStrAt(50,42, "Humidity: 50.3%", 1, BLACK);
	for(x=0;x<128;x++) GDispSetPixel(x,0,BLACK);
	for(x=0;x<128;x++) GDispSetPixel(x,63,BLACK);
	DelayMs(3000);
	GDispClr(0x00);
	GDispPixStrAt(50,32, "12:35 pm", 1, BLACK);
	GDispPixStrAt(50,42, "4th July '06", 1, BLACK);
	for(x=0;x<128;x++) GDispSetPixel(x,0,BLACK);
	for(x=0;x<128;x++) GDispSetPixel(x,63,BLACK);
	DelayMs(3000);
	GDispClr(0xFF);
	DelayMs(3000);
	GDispPixStrAt(0,10, " !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_'abcdefghijklmnopqrstuvwxyz{|}~", 2, WHITE);	
	DelayMs(3000);
	GDispClr(0x00);
	GDispCir(80,50,10,BLACK);
	GDispRec( 10,10,50,50,BLACK);
	DelayMs(3000); 
	GDispClr(0x00);
 	GDispPic(&usaflag);
	DelayMs(3000); 
	GDispClr(0x00);
	GDispPic(&earth);
	DelayMs(3000); 
	GDispClr(0x00);
	}
}
