Hallo,
leider bekomme ich das Display bzw. den Controller nicht Initalisiert.
Diese Parameter schicke ich dem Display.:
CodeBox C
Hiermit schreibe ich die Daten.:
CodeBox C
Und hiermit die Commands
CodeBox C
Ist irgendwas in der Init falsch?
Benutzen tue ich das "XMEGA-A3BU-XPlained"
leider bekomme ich das Display bzw. den Controller nicht Initalisiert.
Diese Parameter schicke ich dem Display.:
CodeBox C
0x40, // Display Start Line 0 0xA1, // Display Normal 0xC0, 0xA6, 0xA2, // Set Bias 0x2F, // Power Control set 0xF8, // Booster Ratio set 0x00, // "" 0x23, // Contrast set 0x81, 0x08, 0xAC, // Static Indicator set 0x00, // "" 0xAF // Display on/off
Hiermit schreibe ich die Daten.:
CodeBox C
[I]uint8_t[/I] n = 0; LCD_CTR_RESET_PORT |= LCD_CTR_RESET_PIN; // RST = 1 LCD_CTR_CS_PORT &= ~LCD_CTR_CS_PIN; // CS = 0 LCD_CTR_A0_PORT |= LCD_CTR_A0_PIN; // A0 = 1 for (n = 0 ; n < 8 ; n++) { LCD_CTR_SCK_PORT &= ~LCD_CTR_SCK_PIN; // 0 if (byte & 0x80) { LCD_CTR_SD_PORT |= LCD_CTR_SD_PIN; // 1 } else { LCD_CTR_SD_PORT &= ~LCD_CTR_SD_PIN; // 0 } byte <<= 1; //_delay_ms(2); LCD_CTR_SCK_PORT |= LCD_CTR_SCK_PIN; // 1 } LCD_CTR_CS_PORT |= LCD_CTR_CS_PIN; // CS = 1 [I]_delay_ms[/I](2);
Und hiermit die Commands
CodeBox C
[I]uint8_t[/I] n = 0; LCD_CTR_RESET_PORT |= LCD_CTR_RESET_PIN; // RST = 1 LCD_CTR_CS_PORT &= ~LCD_CTR_CS_PIN; // CS = 0 LCD_CTR_A0_PORT &= ~LCD_CTR_A0_PIN; // A0 = 0 for (n = 0 ; n < 8 ; n++) { LCD_CTR_SCK_PORT &= ~LCD_CTR_SCK_PIN; // 0 if (cmd & 0x80) { LCD_CTR_SD_PORT |= LCD_CTR_SD_PIN; // 1 } else { LCD_CTR_SD_PORT &= ~LCD_CTR_SD_PIN; // 0 } cmd <<= 1; //_delay_ms(2); LCD_CTR_SCK_PORT |= LCD_CTR_SCK_PIN; // 1 } LCD_CTR_CS_PORT |= LCD_CTR_CS_PIN; // CS = 1 [I]_delay_ms[/I](2);
Ist irgendwas in der Init falsch?
Benutzen tue ich das "XMEGA-A3BU-XPlained"