/*
***********************************************************************************************
*						JHD12864G/J Graphical LCD Demo_2 (KS0107/8 controller)
*
* File name		: gLCD_STK1_Demo2.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			: 5th July 2006
***********************************************************************************************
*/
#include <regx52.h>
#include "delay.h"
#include "ks0108.h"
#include "icons.h"

void main(void)
{
	unsigned char x;

	GDispInit();

	for(;;){
	GDispPixPatAt(3,10,&ICONS[0],BLACK);
	for(x=0;x<128;x++) GDispSetPixel(x,0,BLACK);
	for(x=0;x<128;x++) GDispSetPixel(x,63,BLACK);
	DelayMs(3000);
	GDispBackLite(DISABLE);
	GDispSwitch(DISABLE);
	GDispClr(0xFF);
	GDispPixPatAt(3,10,&ICONS[1],WHITE);
	for(x=0;x<128;x++) GDispSetPixel(x,2,WHITE);
	for(x=0;x<128;x++) GDispSetPixel(x,61,WHITE);
	for(x=124; x<128; x++) GDispSetPixel(x,63,WHITE);
	GDispSwitch(ENABLE);
	GDispBackLite(ENABLE);
	DelayMs(2000);
	for(x=124; x<128; x++) 
		{
			DelayMs(1500);
			GDispSetPixel(x,63,BLACK);
		}
	 DelayMs(2000);
	 GDispClr(0x00);
	}
}
