Problem with JHD 162A LCD

Status
Not open for further replies.

mhkhosravi

New Member
Hello

I have made a simple circuit with Atmega16 that writes only a word on LCD.
when I connect all parts, the LCD only shows full boxes in the second line and the first line is empty.
the LCD shows this even when the micro is off !!!
The program is correct.
the connections is correct too.
I used another LCD and micro but they did the same.
I dont know where is the problem?!
please help me about this ....
 
If the contrast is turned up too high, and the LCD isn't initialised at all, then you get the single line of blocks on the display - this is normal, and shows the LCD is worked to some extent at least.

As it doesn't work how do you know the program and connections are correct?, one (or both) of then are obviously NOT OK.
 
because the program is simple, in BASCOM I wrote :

$regfile = "M16def.dat"
$crystal = 8000000
Config Lcdpin = Pin , Db4 = Pinc.4 , Db5 = Pinc.5 , Db6 = Pinc.6 , Db7 = Pinc.7
_ , E = Pinc.3 , Rs = Pinc.2
Config Lcd = 16 * 2
Lcd "HELLO"

and the connections are this way :
pins :
1,3,5 -> ground
2 -> VCC
6 -> Pinc.3
etc ...

I saw this configuration in some mannuals, but it does not work.
If the problem was about the contrast, then only 5 characters must be filled , or all 32 charsets, but only 16 characters of second line become black boxes
 

I repeat, how do you know the program is correct? - that above doesn't mean much!, I've no idea what it might create - have you?.

If it doesn't work then something is wrong, either it's connected wrong, or the program is wrong (or both) - if they are both correct then it will work!.
 
mhkhosravi said:
ok! it may be from program or connections.
but which and where?

The only person who can determine that is YOU, we don't have your project ourselves.

I can point you to my tutorials, which give both a tested working layout, and tested working code - but it's in assembler.
 
mhkhosravi said:
ok! it may be from program or connections.
but which and where?
in ur postes we don't see any lcd initialisation code or lcd connection pin details. without these it will be impossible to make an useful comment.
 
Last edited:
this is for LCD configuration (in BASIC language, with BASCOM ) :
Config Lcdpin = Pin , Db4 = Pinc.4 , Db5 = Pinc.5 , Db6 = Pinc.6 , Db7 = Pinc.7 _ , E = Pinc.3 , Rs = Pinc.2
Config Lcd = 16 * 2


and the connections are this way :
pins :
1,3,5 -> ground
2 -> VCC
6 -> Pinc.3
etc ...
 
Sorry?, I fail to see your point?.

Does that work?, if not why should you think it's correct?, and is your hardware correct?.
 
..in ur postes we don't see any lcd initialisation code ..... or is that there is nothing like it?
 
mhkhosravi said:
It worked
I only changed the port C to port B. it worked
that's good.. but what was the problem with port C , is it multiplexed with some other function which u haven't disabled.?
 
The micro had no other functions.only handling LCD.It doesnt work with portC. I dont know why ?
I didnt used any capacitor or resistor. I connected all grounds and VCCs and... directly. maybe it should be used some... It is a strange problem
 
mhkhosravi said:
The micro had no other functions.only handling LCD.It doesnt work with portC. I dont know why ?
I didnt used any capacitor or resistor. I connected all grounds and VCCs and... directly. maybe it should be used some... It is a strange problem

That's why you need to learn assembler!, because it gives you knowledge of the hardware - C insulates you from the hardware (some what!), so you don't know what's going on.

A reasonable knowledge of assembler would probably have enabled you to sort this in the first place?.
 
having the same problem

we've used the atmel 89c51 controller..n the same lcd.the only output is the black bolcks with the back lights..we've used the assebly language prog..
the program, the connections work well in the protieus.. the testibg software.... but the result is hard to see on the LCD...

we are unabe to trace the problem since a month ...require HELP!!!!
 
it worked


hi all... the lcd lit up....thr might hv been connection problem...we reconnected the whole thing differently...
 
hi Madhumati,
I am also writing code for LCD display using 8051. But it is is showing just second line with some block. I am not sure due to which part this problem is persisting. can you send me your code. I have connected the LCD with Port0. my mail id is mannish_garg2@yahoo.co.in
 
madhumita said:

hi all... the lcd lit up....thr might hv been connection problem...we reconnected the whole thing differently...
Problem with JHD 162A LCD
can u send me ur code
i dont know where is the problem.
it is in my ocde or in connections
 
Problem with JHD162A LCD


hi madhumati,
Thanks for your reply. But in above code in
1.last three line shouldn't there be call for DAT function rather than COM and 2.have u make delay function for 1ms.
3. Can you also send me the code for initialization.
4. i had initialized in following sequence
i) clear screen
ii) initialize DDRAM
iii) select line
iv)display and cursor on
v) increment the cursor
are u think that i am following wrong sequence.

Also I have connected the data port to port 0 with pull ups by resistance. Control signal with Port2 pins. and i have not connected the pin 15 and 16.
 
Last edited:
hey u write my name properly first...
its madhumItA..

well ur right.... DAT shd replace COM..sry for that..n abt delay..u can increase that use another loop...code that u've asked for...i dont remember them exactly..n i dont hv the text right now...i think u can find those in any std book..use mazzidi...is u can...or u can use the codes i used...they too wrk the same way....
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…