Gast
#1983387
moin im augenblick das problem das ich das LCD display EA W2004B-NLW
über schieberegister initialisieren muss. Habe leider keine ahnung woran
es gerade hapert vll könnt ihr mir ja helfen
Die Datenleitungen sind in der hardware leider verdreht soll heißen
0b10000000 im code heißt 0b00000001 in hardware nicht das ihr euch
verwirren lasst;)
_delay_ms(2000);
//funktion set
display_control = 0b00000000;//Steuerleitungen aus
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_data = 0b11110000;
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_control = 0b10000000;//Enable an
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_control = 0b00000000;//enable aus
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
_delay_us(40);
//display off
display_control = 0b00000000;//Steuerleitungen aus
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_data = 0b00010000;//display off
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_control = 0b10000000;//Enable an
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_control = 0b00000000;//enable aus
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
_delay_us(40);
//clear screen
display_control = 0b00000000;//Steuerleitungen aus
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_data = 0b10000000;//display clear Befehl
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_control = 0b10000000;//Enable an
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
_delay_us(1);
display_control = 0b00000000;//Steuerleitungen aus
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
status |= (clearscr);
//entry mode
display_data = 0b1110000;//schieben nach R/W, DD-RAM automatisch
inkrementieren
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_control = 0b10000000;//Enable an
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_control = 0b00000000;//Enable aus
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
_delay_us(40);
//display on
display_data = 0b11110000;
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_control = 0b10000000;//Enable an
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
display_control = 0b00000000;//ENable aus
schieberegister(display_data, display_control, 0xFF, 0xFF,
DAC_control, (uint8_t)DAC_ausgabe);
_delay_us(40);
wäre euch echt dankbar für hilfe