Hallo,
ich möchte ein Displaytech Displaytech 162 mit KS0070B Controller an
einem AtMega32 mit 7.3xxx Mhz betreiben, scheitere aber kläglich.. Dabei
möchte ich die Lib von Peter Fleury verwenden.
Habe die anderen Beiträge zu diesem Thema hier schon gelesen, aber
leider ohne Erfolg.
Die lcd.h sieht so aus:
1 | #define XTAL 7372800 /**< clock frequency in Hz, used to calculate delay timer */
|
2 |
|
3 | #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */
|
4 |
|
5 | #define LCD_LINES 2 /**< number of visible lines of the display */
|
6 | #define LCD_DISP_LENGTH 16 /**< visibles characters per line of the display */
|
7 | #define LCD_LINE_LENGTH 0x40 /**< internal line length of the display */
|
8 | #define LCD_START_LINE1 0x00 /**< DDRAM address of first char of line 1 */
|
9 | #define LCD_START_LINE2 0x40 /**< DDRAM address of first char of line 2 */
|
10 | #define LCD_START_LINE3 0x14 /**< DDRAM address of first char of line 3 */
|
11 | #define LCD_START_LINE4 0x54 /**< DDRAM address of first char of line 4 */
|
12 | #define LCD_WRAP_LINES 0 /**< 0: no wrap, 1: wrap at end of visibile line */
|
13 |
|
14 | #define LCD_IO_MODE 1 /**< 0: memory mapped mode, 1: IO port mode */
|
15 |
|
16 | #define LCD_PORT PORTC /**< port for the LCD lines */
|
17 | #define LCD_DATA0_PORT LCD_PORT /**< port for 4bit data bit 0 */
|
18 | #define LCD_DATA1_PORT LCD_PORT /**< port for 4bit data bit 1 */
|
19 | #define LCD_DATA2_PORT LCD_PORT /**< port for 4bit data bit 2 */
|
20 | #define LCD_DATA3_PORT LCD_PORT /**< port for 4bit data bit 3 */
|
21 | #define LCD_DATA0_PIN 4 /**< pin for 4bit data bit 0 */
|
22 | #define LCD_DATA1_PIN 5 /**< pin for 4bit data bit 1 */
|
23 | #define LCD_DATA2_PIN 6 /**< pin for 4bit data bit 2 */
|
24 | #define LCD_DATA3_PIN 7 /**< pin for 4bit data bit 3 */
|
25 | #define LCD_RS_PORT PORTD /**< port for RS line */
|
26 | #define LCD_RS_PIN 7 /**< pin for RS line */
|
27 | #define LCD_RW_PORT PORTD /**< port for RW line */
|
28 | #define LCD_RW_PIN 5 /**< pin for RW line */
|
29 | #define LCD_E_PORT PORTD /**< port for Enable line */
|
30 | #define LCD_E_PIN 6 /**< pin for Enable line */
|
Ich will das ganze per folgendem Code starten:
1 | lcd_init(LCD_DISP_ON_CURSOR_BLINK);
|
2 | lcd_home();
|
3 | lcd_puts("LCD-TEST\n");
|
Leider sehe ich nur schwarze Balken...
Hier im Forum las ich, dass der Controller HD44780 kompatibel ist. Im
Datenblatt leider nicht. Haber aber auch die andere Option ausprobiert.
Ohne Erfolg.
Muss ich irgendwo noch zusätzlich warten? Ich kompiliere mit -O0 und im
AVR Simulator passen die Delays auch.
Hat jemand einen Tipp?
Danke,
Andreas