示例#1
0
文件: LCD1602.c 项目: anan-cn/MCU
//��ָ��λ����ʾ�ַ�����: DispCharacter()
//  xΪ�кţ�yΪ�кţ�        
//  dataΪ��ʾ�ַ�����������   
void DispCharacter(uint x, uint y, uint data1)
{
	uint temp;       
	while(StatusCheck());  //��LCD������æ����ȴ�
	
	temp = y & 0x0f;
	x &= 0x01;
	if(x) temp |= 0x40;
	SetDDRAM_Add(temp);	  //������ʾλ��
	
	WriteData(data1);	
	}
示例#2
0
文件: LCD1602.c 项目: anan-cn/MCU
//дָ�����WriteInstruc()
void WriteInstruc(uint Instruc)
{
	while(StatusCheck());
	InitP0(0);
	SetRS(0);
	SetRW(0);
	//ShortDelay(1);
	SetE(0);
	PinData = Instruc;
	//ShortDelay(1);
	SetE(1);
	ShortDelay(10);
	SetE(0);
	//ShortDelay(1);
	SetRW(1);
	SetRS(1);
	}
status_t SNode::ErrorCheck() const
{
	return StatusCheck();
}