/*------------------------------------------------------------------------------------------
[文件名] 12232.c
[版本] V1.5
[作者] 鞠春陽
[最后修改時間] 2003年5月12日
[版權(quán)所有] 哈爾濱眾邦龍科技開發(fā)有限公司 www.mcuzb.com
[12232資料] 請到www.mcuzb.com下載
[程序說明] .h文件請在本站內(nèi)搜索如果沒有的話 可以到論壇留言所取
===========================================================================================*/
#include "reg51.h"
#include "intrins.h"
#include "absacc.h"
#include ".\inc\ASCII816.h" //標準ASCII碼庫
#include ".\inc\HZTable.h" //自制的漢字庫
#include ".\inc\menu.h"</P><P> //自制的菜單庫
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; //確認
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; //確認
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; //確認
LCD12232_A0=0;
LCD12232_RW=1;
LCD12232_E2=1; _nop_();
LCD12232_DATA =i;
while( LCD12232_DATA & 0x80 );





