Ejemplo n.º 1
0
void writeCommandNibble(char commandNibble){
					LCDCON &= ~RS_MASK;

					LCDWRT4(commandNibble);

					__delay_cycles(1000);
}
Ejemplo n.º 2
0
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

}
Ejemplo n.º 3
0
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);

}
Ejemplo n.º 4
0
void writeCommandNibble(char commandNibble){

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