Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 4th May 2008, 12:53 AM   (permalink)
Default LCD Madness

Hello, and sorry to bother you guys! but before i shake hands with all 3phases at work, maybe somebody can help me here.
I have a PIC, its a 16F877...and i have this 2x16 character LCD, which i think is a standard hitachi 44780 LCD. I think both the LCD and the PIC are working fine..seperately that is... when the LCD is connected to power supply, i see the first line is filled...nice...now the problem is that when i connect the display to the PIC... the display doesn't get initialized. nothing happens.. and the PIC dies..and it wont start/restart unless i disconnect the wires goin to the LCD
I tried tons of codes.. this has nothing to do with code.. i tried all ports and all configurations 4/8 bits... I'm sure i got the GND/VCC/contrast wires connected to the right pins since it shows the first line and the contrast thing works.. so i guess all the other pins follow in the standard manner RS/RW/E/D0-D7..
any comments would be much appreciated... thanks guys!!!
jimi252 is offline  
Old 4th May 2008, 12:59 AM   (permalink)
Default

You need to post a schematic, code, etc...
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Old 4th May 2008, 01:33 AM   (permalink)
Default

There's working 16F877 code and schematics on my web-site if you want to have a look.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 4th May 2008, 01:52 AM   (permalink)
Default

hey.. thanks for the prompt reply guys..
basically I think its a hardware issue since the pic wont work if the LCD is connected to power or to the pic... the second I disconnect the lcd power, the pic turns on. (I put some indicating leds). the schematics are exactly as the ones at your page, futz.. (is that a pullup 10K on R/S pin?? and why??)..
I thought maybe someone can identify this LCD, so I attached some bad quality photos.. on the back it has this yellow sticker that says HMC-16215 SG-LY-12-1 0033, so I searched, and found the manufacturer's page. as expected the datasheets can't be downloaded..
Attached Images
File Type: jpg SP_A0303.jpg (37.7 KB, 39 views)
File Type: jpg SP_A0304.jpg (65.7 KB, 38 views)
jimi252 is offline  
Old 4th May 2008, 02:30 AM   (permalink)
Default

Quote:
Originally Posted by jimi252
it has this yellow sticker that says HMC-16215 SG-LY-12-1 0033, so I searched, and found the manufacturer's page. as expected the datasheets can't be downloaded..
Ya, it's a Hitech unit
http://www.hitech-lcd.com/charmodules.html

Their site, as you say, is absolutely useless. But most LCDs these days are pretty much standardized.

Yes, a RS pin pullup is needed. 4K7 is enough. I don't see it in my schematic though - guess I forgot. Actually, the EPE schematic I learned from recommends pullups on all lines except R/W and of course Vee, VDD & Gnd. I only did the RS one and it works fine.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 4th May 2008 at 02:38 AM.
futz is offline  
Old 4th May 2008, 02:38 AM   (permalink)
Default

yea that's what I believe... but I think both my PICs don't agree so...
jimi252 is offline  
Old 4th May 2008, 02:41 AM   (permalink)
Default

Quote:
Originally Posted by jimi252
yea that's what I believe... but I think both my PICs don't agree so...
You have enough power? If your power is sagging and can't supply both PIC and LCD then your symptoms might make sense.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 4th May 2008, 03:18 AM   (permalink)
Default

just tried the pullups idea.... nothing...
oh.. no my power supply is a badass... its a switching PS from an old pc.. very odd...
check this out... when Vcc of LCD is disconnected, pic works.. when reconnected, pic dies... now, when data wires between pic and lcd are disconnected, pic wakes up again.... very odd... i tried a different pic. and different ports..and this happens with 4/8 bits connected regardless..hehehe!!
jimi252 is offline  
Old 4th May 2008, 03:45 AM   (permalink)
Default

Quote:
Originally Posted by jimi252
just tried the pullups idea.... nothing...
oh.. no my power supply is a badass... its a switching PS from an old pc.. very odd...
check this out... when Vcc of LCD is disconnected, pic works.. when reconnected, pic dies... now, when data wires between pic and lcd are disconnected, pic wakes up again.... very odd... i tried a different pic. and different ports..and this happens with 4/8 bits connected regardless..hehehe!!
Well you've got something bad going on there. Go over every connection again. Assume nothing. Check everything, no matter how mundane and simple you think it is. It's most likely a silly mistake. I make em all the time.

It could be software too...
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 4th May 2008, 07:15 AM   (permalink)
Default

Quote:
Originally Posted by jimi252
j... when Vcc of LCD is disconnected, pic works.. when reconnected, pic dies... now, when data wires between pic and lcd are disconnected, pic wakes up again.... very odd.
Your PIC has not died. It just loops in an infinite loop for the LCD BUSY check, as most LCD codes do.
__________________
L.Chung
eblc1388 is offline  
Old 4th May 2008, 06:05 PM   (permalink)
Default

Get a decent camera an get a clue on debugging. Not necessarily in that order.
donniedj is offline  
Old 4th May 2008, 07:13 PM   (permalink)
Default

Quote:
Originally Posted by jimi252
just tried the pullups idea.... nothing...
oh.. no my power supply is a badass... its a switching PS from an old pc.. very odd...
check this out... when Vcc of LCD is disconnected, pic works.. when reconnected, pic dies... now, when data wires between pic and lcd are disconnected, pic wakes up again.... very odd... i tried a different pic. and different ports..and this happens with 4/8 bits connected regardless..hehehe!!
Jimi252, Please try to put a schematic as to how you wired it , with maximum details. Perhaps the asm file too would help.
__________________
Regards,
Sarma.
mvs sarma is offline  
Old 4th May 2008, 11:37 PM   (permalink)
Default

Since we are all on the same sort of subject i Have a 2x16 LCD from dipmicro and everything used to work fine untill i unplugged it and tried to use it for 8 bit mode on another board now it doesnt work right on neither of them. Just shows white blocks on lcd and sometimes it will start with futz code from :
http://ghmicro.com/index.php/pic/2-p...12-junebug-lcd

Im using a 18F1320 without the junebug... The issue is it works when i disconnect and reconnect the power rapidly but only for a few seconds. then back to white blocks... any thoughts?


EDIT: Now it doesnt even show the text on it no more... Is this a LCD issue like stuck in 8 bit mode or something?
AtomSoft is offline  
Old 4th May 2008, 11:45 PM   (permalink)
Default

Quote:
Originally Posted by AtomSoft
Since we are all on the same sort of subject i Have a 2x16 LCD from dipmicro and everything used to work fine untill i unplugged it and tried to use it for 8 bit mode on another board now it doesnt work right on neither of them. Just shows white blocks on lcd and sometimes it will start with futz code from :
http://ghmicro.com/index.php/pic/2-p...12-junebug-lcd

Im using a 18F1320 without the junebug... The issue is it works when i disconnect and reconnect the power rapidly but only for a few seconds. then back to white blocks... any thoughts?

EDIT: Now it doesnt even show the text on it no more... Is this a LCD issue like stuck in 8 bit mode or something?
There is no such thing as "stuck in 8-bit mode". Sounds like a power or contrast problem. Sometimes they're the same thing because too little power changes your contrast setting. And they will do that "works for a few seconds" thing. I've seen it. Probably works till the capacitors charge up (probably stupid wild guess)? Fed it decent power and it was fine again. Meanwhile, adjust your contrast and see what happens.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 4th May 2008, 11:51 PM   (permalink)
Default

How are you powering the LCD? From the Junebugs USB power? If so futz's USB might have the oomph to do it but many USB supplies will not (a powered USB hub will)
LCD backlights can draw anywhere from 65ma to 180ma this may cause your USB port to shut down.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
LCD 2x16 Demo for the Unicorn (18F4550) blueroomelectronics Micro Controllers 21 31st October 2008 05:17 PM
LCD Bargraph (fuel gauge) karenhornby Micro Controllers 10 10th April 2008 06:20 PM
Atmel, assembly:displaying on lcd Haidy Micro Controllers 13 11th February 2008 09:13 PM
PIC16F628A LCD problems. HerbertMunch Micro Controllers 17 2nd October 2007 10:20 AM
Newbie needs help with LCD backlight dimming Mongoose General Electronics Chat 6 22nd September 2007 12:23 AM



All times are GMT. The time now is 09:14 AM.


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

eXTReMe Tracker