LCD Display mit Sitronix ST7066U

Gast #4780135
Lesenswert?

Guten Tag,

Ich programmiere gerade ein Mikrokontroller PIC18F2525 in MPLABX, und 
ich will einen Display LCD mit einem Controller Sitronix ST7066U 
verwenden (LCD CV4162B). Ich habe die Library XLCD.h so konfiguriert:

#define UPPER

/* DATA_PORT defines the port to which the LCD data lines are connected 
*/
 #define DATA_PORT          PORTB
 #define TRIS_DATA_PORT     TRISB

/* CTRL_PORT defines the port where the control lines are connected.
 * These are just samples, change to match your application.
 */
 #define RW_PIN   LATAbits.LATA4       /* PORT for RW */
 #define TRIS_RW  TRISAbits.TRISA4      /* TRIS for RW */

 #define RS_PIN   LATAbits.LATA5       /* PORT for RS */
 #define TRIS_RS  TRISAbits.TRISA5      /* TRIS for RS */

 #define E_PIN    LATAbits.LATA3      /* PORT for D  */
 #define TRIS_E   TRISAbits.TRISA3      /* TRIS for E  */


und ich verbinde die Pins so:
PIC      LCD
PB0--->  D4
PB1--->  D5
PB2--->  D6
PB3--->  D7



Mein Hautprogramm lautet:


#include <p18f2525.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "lcd.h"


/*  Local Includes */
#include "Fuses_Config.h"
#include "SYSTEM_Initialize.h"
#include "Delays_Routines.h"

/* Global Functions */

void init_LCD(void);


void main(void) {

    PIN_MANAGER_Initialize();
    init_LCD();

    putrsXLCD("Hello World");
    SetDDRamAddr(0x40);
    putrsXLCD("LCD Display");

    while (1);
}


void init_LCD(void){

    OpenXLCD(EIGHT_BIT & LINES_5X7);
    while(BusyXLCD());
    WriteCmdXLCD(0x06);
    WriteCmdXLCD(0x0F);
}


aber diese Meldungen kommen irgendwie nicht draus.

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