Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 30th May 2006, 03:03 PM   (permalink)
Default Problem with JHD 162A LCD

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 ....
mhkhosravi is offline  
Old 30th May 2006, 03:24 PM   (permalink)
Default

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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 30th May 2006, 03:39 PM   (permalink)
Default

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
mhkhosravi is offline  
Old 30th May 2006, 04:05 PM   (permalink)
Default

Quote:
Originally Posted by mhkhosravi
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!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 30th May 2006, 04:48 PM   (permalink)
Default

ok! it may be from program or connections.
but which and where?
mhkhosravi is offline  
Old 30th May 2006, 06:28 PM   (permalink)
Default

Quote:
Originally Posted by mhkhosravi
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 31st May 2006, 08:02 AM   (permalink)
Default

Quote:
Originally Posted by mhkhosravi
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.
__________________
Gods own Country
Incredible !ndia

www.flickr.com/photos/_akg/

"Give a man a fish, and he will eat for a day. Teach that man to fish, and he will eat for a lifetime."

Last edited by akg; 31st May 2006 at 08:05 AM.
akg is offline  
Old 31st May 2006, 06:02 PM   (permalink)
Default

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 ...
mhkhosravi is offline  
Old 31st May 2006, 11:38 PM   (permalink)
Default

Sorry?, I fail to see your point?.

Does that work?, if not why should you think it's correct?, and is your hardware correct?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 1st June 2006, 06:49 AM   (permalink)
Default

..in ur postes we don't see any lcd initialisation code ..... or is that there is nothing like it?
__________________
Gods own Country
Incredible !ndia

www.flickr.com/photos/_akg/

"Give a man a fish, and he will eat for a day. Teach that man to fish, and he will eat for a lifetime."
akg is offline  
Old 3rd June 2006, 02:06 PM   (permalink)
Default

It worked
I only changed the port C to port B. it worked
mhkhosravi is offline  
Old 5th June 2006, 07:09 AM   (permalink)
Default

Quote:
Originally Posted by mhkhosravi
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.?
__________________
Gods own Country
Incredible !ndia

www.flickr.com/photos/_akg/

"Give a man a fish, and he will eat for a day. Teach that man to fish, and he will eat for a lifetime."
akg is offline  
Old 5th June 2006, 06:23 PM   (permalink)
Default

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 is offline  
Old 5th June 2006, 10:17 PM   (permalink)
Default

Quote:
Originally Posted by mhkhosravi
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?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 9th March 2007, 07:28 AM   (permalink)
Angry 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!!!!
madhumita is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 12:27 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker