Dirk M
30.09.2007, 19:49
Hallo,
versuche schon seit mehreren Stunden ein Pollin LCD ( http://www.pollin.de/shop/shop.php?cf=detail.php&pg=OA==&a=Nzc1OTc4OTk=&w=OTg4OTk4&ts=20 ) zum laufen zu bekommen..
Leider ohne erfolgt :-(
Bevor ich lcd_init(LCD_DISP_ON); aufrufe, zeigt das Display einen Balken in der zweiten Zeile..
Danach leider nichts mehr..
Bei lcd_puts("Hello world."); bleibt das Display ebenfalls leer.
Meine lcd.h:
#define XTAL 16000000 /**< clock frequency in Hz, used to calculate delay timer */
/**
* @name Definition for LCD controller type
* Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller.
*/
#define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */
/**
* @name Definitions for Display Size
* Change these definitions to adapt setting to your display
*/
#define LCD_LINES 2 /**< number of visible lines of the display */
#define LCD_DISP_LENGTH 16 /**< visibles characters per line of the display */
#define LCD_LINE_LENGTH 0x40 /**< internal line length of the display */
#define LCD_START_LINE1 0x00 /**< DDRAM address of first char of line 1 */
#define LCD_START_LINE2 0x40 /**< DDRAM address of first char of line 2 */
#define LCD_START_LINE3 0x14 /**< DDRAM address of first char of line 3 */
#define LCD_START_LINE4 0x54 /**< DDRAM address of first char of line 4 */
#define LCD_WRAP_LINES 0 /**< 0: no wrap, 1: wrap at end of visibile line */
#define LCD_IO_MODE 1 /**< 0: memory mapped mode, 1: IO port mode */
#if LCD_IO_MODE
/**
* @name Definitions for 4-bit IO mode
* Change LCD_PORT if you want to use a different port for the LCD pins.
*
* The four LCD data lines and the three control lines RS, RW, E can be on the
* same port or on different ports.
* Change LCD_RS_PORT, LCD_RW_PORT, LCD_E_PORT if you want the control lines on
* different ports.
*
* Normally the four data lines should be mapped to bit 0..3 on one port, but it
* is possible to connect these data lines in different order or even on different
* ports by adapting the LCD_DATAx_PORT and LCD_DATAx_PIN definitions.
*
*/
#define LCD_PORT PORTD /**< port for the LCD lines */
#define LCD_DATA0_PORT LCD_PORT /**< port for 4bit data bit 0 */
#define LCD_DATA1_PORT LCD_PORT /**< port for 4bit data bit 1 */
#define LCD_DATA2_PORT LCD_PORT /**< port for 4bit data bit 2 */
#define LCD_DATA3_PORT LCD_PORT /**< port for 4bit data bit 3 */
#define LCD_DATA0_PIN 3 /**< pin for 4bit data bit 0 */
#define LCD_DATA1_PIN 4 /**< pin for 4bit data bit 1 */
#define LCD_DATA2_PIN 5 /**< pin for 4bit data bit 2 */
#define LCD_DATA3_PIN 6 /**< pin for 4bit data bit 3 */
#define LCD_RS_PORT PORTB /**< port for RS line */
#define LCD_RS_PIN 3 /**< pin for RS line */
#define LCD_RW_PORT PORTB /**< port for RW line */
#define LCD_RW_PIN 2 /**< pin for RW line */
#define LCD_E_PORT LCD_PORT /**< port for Enable line */
#define LCD_E_PIN 2 /**< pin for Enable line */
....
Habe die Pins und Leitungen schon mehrfach geprüft.
Hat jemand eine Idee wodran es liegen könnte?
Schonmal vielen Dank :-)
PS.: es handelt sich dabei um einen ATMEGA32
versuche schon seit mehreren Stunden ein Pollin LCD ( http://www.pollin.de/shop/shop.php?cf=detail.php&pg=OA==&a=Nzc1OTc4OTk=&w=OTg4OTk4&ts=20 ) zum laufen zu bekommen..
Leider ohne erfolgt :-(
Bevor ich lcd_init(LCD_DISP_ON); aufrufe, zeigt das Display einen Balken in der zweiten Zeile..
Danach leider nichts mehr..
Bei lcd_puts("Hello world."); bleibt das Display ebenfalls leer.
Meine lcd.h:
#define XTAL 16000000 /**< clock frequency in Hz, used to calculate delay timer */
/**
* @name Definition for LCD controller type
* Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller.
*/
#define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */
/**
* @name Definitions for Display Size
* Change these definitions to adapt setting to your display
*/
#define LCD_LINES 2 /**< number of visible lines of the display */
#define LCD_DISP_LENGTH 16 /**< visibles characters per line of the display */
#define LCD_LINE_LENGTH 0x40 /**< internal line length of the display */
#define LCD_START_LINE1 0x00 /**< DDRAM address of first char of line 1 */
#define LCD_START_LINE2 0x40 /**< DDRAM address of first char of line 2 */
#define LCD_START_LINE3 0x14 /**< DDRAM address of first char of line 3 */
#define LCD_START_LINE4 0x54 /**< DDRAM address of first char of line 4 */
#define LCD_WRAP_LINES 0 /**< 0: no wrap, 1: wrap at end of visibile line */
#define LCD_IO_MODE 1 /**< 0: memory mapped mode, 1: IO port mode */
#if LCD_IO_MODE
/**
* @name Definitions for 4-bit IO mode
* Change LCD_PORT if you want to use a different port for the LCD pins.
*
* The four LCD data lines and the three control lines RS, RW, E can be on the
* same port or on different ports.
* Change LCD_RS_PORT, LCD_RW_PORT, LCD_E_PORT if you want the control lines on
* different ports.
*
* Normally the four data lines should be mapped to bit 0..3 on one port, but it
* is possible to connect these data lines in different order or even on different
* ports by adapting the LCD_DATAx_PORT and LCD_DATAx_PIN definitions.
*
*/
#define LCD_PORT PORTD /**< port for the LCD lines */
#define LCD_DATA0_PORT LCD_PORT /**< port for 4bit data bit 0 */
#define LCD_DATA1_PORT LCD_PORT /**< port for 4bit data bit 1 */
#define LCD_DATA2_PORT LCD_PORT /**< port for 4bit data bit 2 */
#define LCD_DATA3_PORT LCD_PORT /**< port for 4bit data bit 3 */
#define LCD_DATA0_PIN 3 /**< pin for 4bit data bit 0 */
#define LCD_DATA1_PIN 4 /**< pin for 4bit data bit 1 */
#define LCD_DATA2_PIN 5 /**< pin for 4bit data bit 2 */
#define LCD_DATA3_PIN 6 /**< pin for 4bit data bit 3 */
#define LCD_RS_PORT PORTB /**< port for RS line */
#define LCD_RS_PIN 3 /**< pin for RS line */
#define LCD_RW_PORT PORTB /**< port for RW line */
#define LCD_RW_PIN 2 /**< pin for RW line */
#define LCD_E_PORT LCD_PORT /**< port for Enable line */
#define LCD_E_PIN 2 /**< pin for Enable line */
....
Habe die Pins und Leitungen schon mehrfach geprüft.
Hat jemand eine Idee wodran es liegen könnte?
Schonmal vielen Dank :-)
PS.: es handelt sich dabei um einen ATMEGA32