LCD Display reaktivieren, Fleury funktioniert nicht

OP #3120094
Lesenswert?

Hallo Leute, hab nach langem suchen immer noch nicht das Problem beheben 
können warum mein 2x16 LCD nichts anzeigt.
Benutzen tu ich die Lib von Peter Fleury, folgendes ist eingestellt:
lcd.h:
1
#define XTAL 4000000              /**< clock frequency in Hz, used to calculate delay timer */
2

3

4
/**
5
 * @name  Definition for LCD controller type
6
 * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller.
7
 */
8
#define LCD_CONTROLLER_KS0073 1  /**< Use 0 for HD44780 controller, 1 for KS0073 controller */
9

10
/** 
11
 *  @name  Definitions for Display Size 
12
 *  Change these definitions to adapt setting to your display
13
 */
14
#define LCD_LINES           2     /**< number of visible lines of the display */
15
#define LCD_DISP_LENGTH    16     /**< visibles characters per line of the display */
16
#define LCD_LINE_LENGTH  0x40     /**< internal line length of the display    */
17
#define LCD_START_LINE1  0x00     /**< DDRAM address of first char of line 1 */
18
#define LCD_START_LINE2  0x40     /**< DDRAM address of first char of line 2 */
19
#define LCD_START_LINE3  0x14     /**< DDRAM address of first char of line 3 */
20
#define LCD_START_LINE4  0x54     /**< DDRAM address of first char of line 4 */
21
#define LCD_WRAP_LINES      0     /**< 0: no wrap, 1: wrap at end of visibile line */
22

23

24
#define LCD_IO_MODE      1         /**< 0: memory mapped mode, 1: IO port mode */
25
#if LCD_IO_MODE
26
#define LCD_PORT         PORTA        /**< port for the LCD lines   */
27
#define LCD_DATA0_PORT   LCD_PORT     /**< port for 4bit data bit 0 */
28
#define LCD_DATA1_PORT   LCD_PORT     /**< port for 4bit data bit 1 */
29
#define LCD_DATA2_PORT   LCD_PORT     /**< port for 4bit data bit 2 */
30
#define LCD_DATA3_PORT   LCD_PORT     /**< port for 4bit data bit 3 */
31
#define LCD_DATA0_PIN    6            /**< pin for 4bit data bit 0  */
32
#define LCD_DATA1_PIN    5            /**< pin for 4bit data bit 1  */
33
#define LCD_DATA2_PIN    4            /**< pin for 4bit data bit 2  */
34
#define LCD_DATA3_PIN    3            /**< pin for 4bit data bit 3  */
35
#define LCD_RS_PORT      LCD_PORT     /**< port for RS line         */
36
#define LCD_RS_PIN       0            /**< pin  for RS line         */
37
#define LCD_RW_PORT      LCD_PORT     /**< port for RW line         */
38
#define LCD_RW_PIN       1            /**< pin  for RW line         */
39
#define LCD_E_PORT       LCD_PORT     /**< port for Enable line     */
40
#define LCD_E_PIN        2            /**< pin  for Enable line     */

meine main.c sieht so aus:
1
#include "lcd.h"
2
#include <util/delay.h>
3
#include <avr/io.h>
4

5
int main(void)
6
  {
7
  _delay_ms(2000);
8
      /* Initialisiere Display, Cursor aus */
9
      lcd_init(LCD_DISP_ON);
10
      _delay_ms(2000);
11
      /* loesche das LCD Display und Cursor auf 1 Zeile, 1 Spalte */
12
      lcd_clrscr();
13

14
      /* String auf Display anzeigen */
15
      lcd_puts("Hello world.");
16
      lcd_data( 'T' );
17
      _delay_ms(2000);
18
      while(1) {                // (5)
19
          /* "leere" Schleife*/   // (6)
20
        }                         // (7)
21

22
        /* wird nie erreicht */
23
        return 0;
24

25
}

Angeschlossen ist es wie folgt:
RS = PA0
RW = PA1
EN = PA2
D4 = PA3
D5 = PA4
D6 = PA5
D7 = PA6
Ansteuerung im 4 bit Modus
Sieht jemand den Fehler?
#3120222
Lesenswert?

Chris tian schrieb:
> Atmega 32 interner Osc. 8MHz

sag mal willst du uns verarschen?
1
#define XTAL 4000000              /**< clock frequency in Hz, used to calculate delay timer */

du wirst doch wohl noch in der Lage sein, deine 3 Angaben die du hast 
(Taktfrequenz, HD44780 kompatibel und die Anschlussbelegung wie auf der 
Platine geätzt) korrekt im Header File einzutragen!

Wenn nicht, dann such dir ein anderes Hobby
Gast #3120308
Lesenswert?

Hi Chris,

kontrolliere auch nochmal deine Platine, an dem einen Potianschluß hat 
es Zinnspritzer, evtl. machen die einen Kurzschluß? Am Pin 40 des 
Prozessors hat es auch Lötzinn, das einen Kurzschluß machen könnte.
Gast #3121003
Lesenswert?

Karl Heinz Buchegger schrieb:
> sag mal willst du uns verarschen?

Karl Heinz Buchegger schrieb:
> du wirst doch wohl noch in der Lage sein, deine 3 Angaben die du hast
> (Taktfrequenz, HD44780 kompatibel und die Anschlussbelegung wie auf der
> Platine geätzt) korrekt im Header File einzutragen!
>
> Wenn nicht, dann such dir ein anderes Hobby

Karl Heinz Buchegger schrieb:
> Also war auch das noch gelogen.

Ich glaub der Karl hat langsam die Nase voll, normallerweisse ist ganz 
Nett und Lieb, naja

Schade

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren