各位大佬,画的HT1621B驱动板驱动液晶,烧录程序后液晶不显示程序如下。
#include
#include
#define uint unsigned int
#define uchar unsigned char
#define uint32 unsigned long int
#define CKSEL (*(uchar vola
tile xdata *)0xfe00)
#define CLKDIV (*(uchar volatile xdata *)0xfe01)
#define IRC24MCR (*(uchar volatile xdata *)0xfe02)
sfr P1M0=0x92;
sfr P1M1=0x91;
sfr P_SW2 = 0xba;
sbit _DAT=P1^6; //HT1621数据引脚
sbit _CS=P1^0; //HT1621使能引脚
sbit _WR=P1^1; //HT1621时钟引脚
sbit _Vlcd=P1^7;//液晶/背光
电源控制引脚,低电平有效
void delay_ms(uint z) //主时钟频率24MHz
{
uchar i=11 j=190;
_nop_();
_nop_();
_nop_();
while(z--)
{
do
{
while (--j);
} while (--i);
}
}
void WriteBitR(uchar datuchar m)
{
uchar i;
for (i=0;i