Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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?! :confused:
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 :confused:
 
mhkhosravi said:
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 :confused:

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.
 
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 ...
 
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 :confused:
 
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 :confused:

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...
 
madhumita said:
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!!!!
hi Madhumati,
I am also writing code for LCD display using 8051. But it is is showing just second line with some block. :mad: 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

madhumita said:
Mov A,#38h
Acall Com
Acall Delay
Mov A,#0eh
Acall Com
Acall Delay
Mov A,#01h
Acall Com
Acall Delay
Mov A,#06h
Acall Com
Acall Delay
Mov A,#80h
Acall Com
Acall Delay
Mov A,'s'
Acall Com
Acall Delay
Mov A,'o'
Acall Com
Acall Delay



Com: Mov P1,a
Clr P3.1
Clr P3.2
Setb P3.3
Clr P3.3
Ret

Dat: Mov P1,a
Setb P3.1
Clr P3.2
Setb P3.3
Clr P3.3
Ret


Delay: Mov R4,#00h
Abc: Inc R4
Cjne R4,#255,abc
Ret







This Is The Code....jst Chk The Connections From The Potentiometer That U Use....

For Code U Can Refer Any Standard Book Where The Interfacing Is Mentioned....

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top