www.joy
-
it.net
Pascalstr. 8 47506 Neukirchen
-
Vluyn
//Initialization of the display
void
LCDInit
() {
pinMode(PIN_SCE, OUTPUT);
pinMode(PIN_RESET, OUTPUT);
pinMode(PIN_DC, OUTPUT);
pinMode(PIN_SDIN, OUTPUT);
pinMode(PIN_SCLK, OUTPUT);
digitalWrite(PIN_RESET, LOW);
digitalWrite(PIN_RESET, HIGH);
LCDWrite(LCD_COMMAND,
0x21
);
LCDWrite(LCD_COMMAND,
0xB0
);
LCDWrite(LCD_COMMAND,
0x04
);
LCDWrite(LCD_COMMAND,
0x14
);
LCDWrite(LCD_COMMAND,
0x20
);
LCDWrite(LCD_COMMAND,
0x0C
);
}
void
LCDWrite
(byte data_or_command, byte data) {
digitalWrite(PIN_DC, data_or_command);
digitalWrite(PIN_SCE, LOW);
shiftOut(PIN_SDIN, PIN_SCLK, MSBFIRST, data);
digitalWrite(PIN_SCE, HIGH);
}