#include "reg51.h"
#include "intrins.h"
#include "absacc.h"
#include ".\inc\ASCII816.h" //標(biāo)準(zhǔn)ASCII碼庫(kù)
#include ".\inc\HZTable.h" //自制的漢字庫(kù)
#include ".\inc\menu.h"</P><P> //自制的菜單庫(kù)
sbit LCD12232_A0=P3^3;
sbit LCD12232_RW=P3^1; //讀寫
sbit LCD12232_E1=P3^5; //片選1(Master)
sbit LCD12232_E2=P3^4; //片選2(slave)
#define LCD12232_DATA P1 //數(shù)據(jù)口
void ClearScreen(void);
/*----------------------------------------------------------------------------
調(diào)用方式:void OutMI(unsigned char i)
函數(shù)說明:發(fā)指令i到主窗口。(內(nèi)函數(shù),私有,用戶不直接調(diào)用)
------------------------------------------------------------------------------*/
void OutMI(unsigned char i)
{
LCD12232_E2=0; //確認(rèn)
LCD12232_A0=0;
LCD12232_RW=1;
LCD12232_E1=1; _nop_();
LCD12232_DATA = i;
while( LCD12232_DATA & 0x80 ); //busy?
LCD12232_E1=0; _nop_();</P><P>LCD12232_RW=0;
LCD12232_E1=1; _nop_();</P><P>LCD12232_DATA=i;_nop_();
LCD12232_E1=0; _nop_();
}
/*------------------------------------------------------------------------------
調(diào)用方式:void OutMD(unsigned char i)
函數(shù)說明:發(fā)數(shù)據(jù)i到主窗口。(內(nèi)函數(shù),私有,用戶不直接調(diào)用)
-------------------------------------------------------------------------------*/
void OutMD(unsigned char i)
{
LCD12232_E2=0; //確
LCD12232_A0=0;
LCD12232_RW=1;
LCD12232_E1=1; _nop_();
LCD12232_DATA = i;
while( LCD12232_DATA & 0x80 );
LCD12232_E1=0; _nop_();LCD12232_A0=1;
LCD12232_RW=0;
LCD12232_E1=1; _nop_();
LCD12232_DATA=i; _nop_();
LCD12232_E1=0; _nop_();
}
*------------------------------------------------------------------------------
調(diào)用方式:void OutSI(unsigned char i)
函數(shù)說明:發(fā)指令i到從窗口。(內(nèi)函數(shù),私有,用戶不直接調(diào)用)
-------------------------------------------------------------------------------*/
void OutSI(unsigned char i)
{
LCD12232_E1=0; //確認(rèn)
LCD12232_A0=0;
LCD12232_RW=1;
LCD12232_E2=1; _nop_();
LCD12232_DATA = i;
while( LCD12232_DATA & 0x80 );
LCD12232_E2=0; _nop_();
LCD12232_RW=0;
LCD12232_E2=1; _nop_();
LCD12232_DATA=i; _nop_();
LCD12232_E2=0; _nop_();
}
/*------------------------------------------------------------------------------
調(diào)用方式:void OutSD(unsigned char i)
函數(shù)說明:發(fā)數(shù)據(jù)i到從窗口。(內(nèi)函數(shù),私有,用戶不直接調(diào)用)
-------------------------------------------------------------------------------*/
void OutSD(unsigned char i)
{
LCD12232_E1=0; //確認(rèn)
LCD12232_A0=0;
LCD12232_RW=1;
LCD12232_E2=1; _nop_();
LCD12232_DATA =i;
while( LCD12232_DATA & 0x80 );
LCD12232_E2=0; _nop_();
LCD12232_A0=1;
LCD12232_RW=0;
LCD12232_E2=1; _nop_();
LCD12232_DATA=i; _nop_();
LCD12232_E2=0; _nop_();
}</P><P>/*--------------------------------------------------------------------------------------------------*/
//顯示8*8點(diǎn)陣
//字模被豎著切分
//lin:行(0-3), column: 列(0-14)
//address : 字模區(qū)首地址
void Show88(unsigned char lin,unsigned char column,unsigned int address)





