Guten Tag zusammen Ich möchte gerne das Display über die SPI Schnittstelle ansteuern und bekomme es nicht zum laufen. Ich habe es schonmal mit 8Bit betrieben und da hat es auch hingehauen. Vielleicht sieht ja Einer was ich falsch mache. Auszüge: PORTB = 0xFF; DDRB = 0xFF; SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0); void out (u08 d) { PORTB &= ~0x02; SPDR = d; // Wait for transmission complete while(!(SPSR & (1<<SPIF))); _delay_us(30); PORTB |= 0x02; } void homer() { out('H'); // 1 H out('o'); // 2 O out('m'); // 3 M out('e'); // 4 E out('r'); // 5 R void init() //Display init { out(0x38); _delay_ms(30); out(0x39); _delay_ms(30); out(0x1D); _delay_ms(30); out(0x50); _delay_ms(30); out(0x6C); _delay_ms(30); out(0x7C); _delay_ms(30); out(0x0F); _delay_ms(30); out(0x01); _delay_ms(30); out(0x06); } main() { init(); homer(); } Angeschlossen: PB0 = RS PB1 = CSB MOSI = SI SCK = CLK Ich danke schonmal im Vorraus für Eure Mühen.
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.