/* MAIN.C file
*
* Copyright (c) 2002-2005 STMicroelectronics
*/
#include"stm8s.h"
#include"stm8s105s4.h"
#include"stdio.h"
#define uchar unsigned char
#define uint unsigned int
_Bool LCD_RS @PC_ODR:2;
_Bool LCD_RW @PC_ODR:3;
_Bool LCD_EN @PE_ODR:6;
_Bool LCD_PSB @PC_ODR:1;
_Bool LCD_RST @PE_ODR:5;
_Bool DOT @PC_ODR:1;
uchar Key_Value=0;
char key_table[]=
{0xe7,0xd7,0xb7,0x77,/*第一行四个按键*/
0xeb,0xdb,0xbb,0x7b,/*第二行四个按键*/
0xed,0xdd,0xbd,0x7d,/*第三行四个按键*/
0xee,0xde,0xbe,0x7e/*第四行四个按键*/
};
void delaynms(unsigned int di) //延时
{
unsigned int da,db;
for(da=0;da