GLCD PROBELM

Programmer, In-Circuit Debugger, PIC Start-Up Kit, Memory Interface...

GLCD PROBELM

Postby jony john » Wed Jan 19, 2011 11:42 pm

hye all,
I need help regarding to glcd please.
I use 18F452, 20MHz, glcd pin connection as below:

GLCD Pin connections:
//// (These can be changed as needed in the following defines).
//// * 1: VSS is connected to GND
//// * 2: VDD is connected to +5V
//// * 3: V0 - LCD operating voltage is connected from a 20k Ohm POT
//// * 4: D/I - Data or Instruction is connected to B2
//// * 5: R/W - Read or Write is connected to B4
//// * 6: Enable is connected to B5
//// *7-14: Data Bus 0 to 7 is connected to port d
//// *15: Chip Select 1 is connected to B0
//// *16: Chip Select 2 is connected to B1
//// *17: Reset is connected to C0
//// *18: Negative voltage is also connected to the 20k Ohm POT
//// *19: Positive voltage for LED backlight is connected to +5V
//// *20: Negavtive voltage for LED backlight is connected to GND

My coding are as below:
#include <18F452.H>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#include "c:\program files\picc\drivers\HDM64GS12.c"
#include "c:\program files\picc\drivers\graphics.c"

void main()
{
char text[30]="HYE ALL";
char text1[30]="HELLO WORLD";
glcd_init(ON);
delay_ms(500);
glcd_fillScreen(OFF);
while(1)
{
glcd_text57(0,0,text,1,ON);
glcd_text57(0,12,text1,1,ON);
delay_ms(1000);
}
}

What I got from simulation and hardware(using SK40C):
http://img836.imageshack.us/i/glcdsk40c.png/

but I got problem when I use SK4OB:
http://img341.imageshack.us/i/glcdsk40b.png/

In my project I use SK40B, so I really need your help.
Your kind help about this matter are much appreciated.
jony john
Freshie
 
Posts: 4
Joined: Sat Jun 12, 2010 6:06 pm

Re: GLCD PROBELM

Postby ABSF » Thu Jan 20, 2011 1:00 pm

Is your GLCD based on KS0108B controller chip?

CS1 and CS2 control each half of the display. Looks like your CS1 and CS2 in your SK40B are shorted. Just check B0 and B1 and see where they are connected.

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: GLCD PROBELM

Postby jony john » Thu Jan 20, 2011 8:13 pm

what are you means by "Looks like your CS1 and CS2 in your SK40B are shorted"..
what are confuse me is when use SK40C the output is ok..but when use SK40B the output error.,which is the both of circuit is use same program and same connection to glcd :?
jony john
Freshie
 
Posts: 4
Joined: Sat Jun 12, 2010 6:06 pm

Re: GLCD PROBELM

Postby ABSF » Thu Jan 20, 2011 9:04 pm

I checked the user manual of SK40B and found that RB0 is pulled high using a 4.7K resistor and a 100nF cap to Gnd. But the RB0 and RB1 of SK40C are pulled high by 10K resistors and there's no 100nF to Gnd. Since the CS1 of your GLCD is connected to RB0. The 4.7K and 100nF might have some effect on the CS1 (chip select) function. You might try to relocate your CS1 away from RB0 to see if it can work properly.

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia


Return to PIC Development Tool

Who is online

Users browsing this forum: No registered users and 16 guests