Tymoty
New Member
Hi,
I have a problem with glcd (atm12846-ks0108) and PIC18F4525.
I tried code from: https://www.electro-tech-online.com/threads/glcd.41023/ but my glcd only shining. I checked wires, crystal and atc. but still nothing. For data I use portB, for others portD (CS1-RD3; CS2-RD2; D/I-RD7; RW-RD6; E-RD5; RESET-RD4)
I changed in code onli this:
main.c
TRISB = 0x00;
TRISD = 0x00;
glcd.c
#define GLCD_Data LATB
#define b_GLCD_GCS1 LATDbits.LATD3
#define b_GLCD_GCS2 LATDbits.LATD2
#define b_GLCD_RS LATDbits.LATD7
#define b_GLCD_RW LATDbits.LATD6
#define b_GLCD_E LATDbits.LATD5
#define b_GLCD_On LATDbits.LATD4
#define TRIS_Data TRISB
#define b_TRIS_GCS1 TRISDbits.TRISD3 //GCS1
#define b_TRIS_GCS2 TRISDbits.TRISD2 //GCS2
#define b_TRIS_RS TRISDbits.TRISD7 //RS
#define b_TRIS_RW TRISDbits.TRISD6 //RW
#define b_TRIS_E TRISDbits.TRISD5 //E
#define b_TRIS_On TRISDbits.TRISD4 //RST
and of course type of mcu. Any ideas? thx
I have a problem with glcd (atm12846-ks0108) and PIC18F4525.
I tried code from: https://www.electro-tech-online.com/threads/glcd.41023/ but my glcd only shining. I checked wires, crystal and atc. but still nothing. For data I use portB, for others portD (CS1-RD3; CS2-RD2; D/I-RD7; RW-RD6; E-RD5; RESET-RD4)
I changed in code onli this:
main.c
TRISB = 0x00;
TRISD = 0x00;
glcd.c
#define GLCD_Data LATB
#define b_GLCD_GCS1 LATDbits.LATD3
#define b_GLCD_GCS2 LATDbits.LATD2
#define b_GLCD_RS LATDbits.LATD7
#define b_GLCD_RW LATDbits.LATD6
#define b_GLCD_E LATDbits.LATD5
#define b_GLCD_On LATDbits.LATD4
#define TRIS_Data TRISB
#define b_TRIS_GCS1 TRISDbits.TRISD3 //GCS1
#define b_TRIS_GCS2 TRISDbits.TRISD2 //GCS2
#define b_TRIS_RS TRISDbits.TRISD7 //RS
#define b_TRIS_RW TRISDbits.TRISD6 //RW
#define b_TRIS_E TRISDbits.TRISD5 //E
#define b_TRIS_On TRISDbits.TRISD4 //RST
and of course type of mcu. Any ideas? thx