示例#1
0
文件: Lab4_LCD.c 项目: cbusho/LCD
void writeCommandNibble(char commandNibble){
					LCDCON &= ~RS_MASK;

					LCDWRT4(commandNibble);

					__delay_cycles(1000);
}
示例#2
0
文件: Lab4_LCD.c 项目: cbusho/LCD
void LCDWRT8(char byteToSend){
	 	 	 	 	  char sendByte = byteToSend;

	 	 	 	 	  sendByte &= 0xf0;                                         // load full byte

					  sendByte = sendByte >> 4;												// shift in four zeros on the left
	                  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  // store send data
	                  LCDWRT4(sendByte);                                                // write upper nibble

	                  sendByte = byteToSend;                                            // load full byte

	                  sendByte &= 0x0f;                                               // clear upper nibble

	                  LCDWRT4(sendByte);                                                // write lower nibble

}
示例#3
0
文件: lcd.c 项目: travisschriner/Lab4
void LCDWRT8(char byteToSend){

	unsigned char sendByte = byteToSend;

	sendByte &= 0xF0;

	// rotate to the right 4 times
    sendByte = sendByte >> 4;

    LCDWRT4(sendByte);

    sendByte = byteToSend;

    sendByte &= 0x0F;

    LCDWRT4(sendByte);

}
示例#4
0
文件: lcd.c 项目: travisschriner/Lab4
void writeCommandNibble(char commandNibble){

    LCDCON &= ~RS_MASK;
    LCDWRT4(commandNibble);
    LCDDELAY2();
}