View previous topic :: View next topic |
Author |
Message |
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
20x4 LCD Issues - CLOSED |
Posted: Fri Nov 29, 2019 12:59 pm |
|
|
Hi All,
I use the following screen:
https://www.sparkfun.com/products/9568
The schematic is based on this:
https://www.sparkfun.com/datasheets/LCD/Serial%20LCD%20Backpack%20v28.pdf
This screen is famous for at some point showing 2 black bars and not responding to serial commands.
The Serial part of it is handled by an on-board PIC, and i always assumed that the black bar issue was caused by poor/rushed serial firmware.
So as a test i decided to reprogram the on-board PIC16F88 with the Flex_LCD driver by PCM.
The problem persists, i need to cycle power multiple times and eventually, sometimes, it works.
I have a feeling this might be a timing issue when both the LCD Controller and the PIC are initializing, but I've tried disabling pin hardware, start up delays, etc.. with no success.
I'm hoping someone here has suggestions on what could be causing this.
Thanks
G. _________________ CCS PCM 5.078 & CCS PCH 5.093
Last edited by Gabriel on Mon Dec 09, 2019 8:48 am; edited 1 time in total |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9244 Location: Greensville,Ontario
|
|
Posted: Fri Nov 29, 2019 2:40 pm |
|
|
That schematic doesn't show ANYTHING connected to _mclr....
I don't see any good VDD filtering....
Are all nonused I/O pins set low or high ?
Is the VDD supply rock stable and good for say 1 or 2 amps ?
I have to say I use the 20x4 LCDs all the time for years, using flex_LCD and have never had an issue (aside from flippin RS and E then NOT changing the code.....oopsy).
I think flex has a 35ms delay in the lcd_init function, though I always do.
Code: |
lcd_init();
delay_ms(500);
|
The 1/2 second is a carry over from 30 years ago (kinda stuck in a rut...), and frankly I can wait a 1/2 second... (another swig of coffee !)
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19541
|
|
Posted: Fri Nov 29, 2019 2:50 pm |
|
|
What is the part number of the resonator?.
What fuses are you using to set this up?.
My guess would be a processor startup issue.
As an ongoing comment you say:
"but I've tried disabling pin hardware, start up delays, etc.."
How long have you got for the startup delay?.
The original Hitachi chip required 90mSec after start, before any commands
could be accepted. The PIC however generally wakes before most LCD's
and many of the 'clone' drivers need up to perhaps twice this time. So
something like 250mSec before you try to send anything to the display
is a much safer delay. |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Sat Nov 30, 2019 2:20 pm |
|
|
Holy smokes... i never though of double checking the MCLR circuit, i assumed it was correct since it was an old Sparkfun design. I am a bit disappointed i must admit.
I checked the hardware and indeed MCLR goes straight to the breakout pin/header.
I have not had a chance to add the diode/resistor/pullup combo. But as soon as i get home tomorrow I'm on it and I'll report back with fuses and the rest of the necessary diagnosis info. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Mon Dec 09, 2019 8:48 am |
|
|
So, turns out the MCLR circuit is pretty important. Who would have thought that! *sarcasm*
There's a lesson in trust for me. Even with the diagram on hand i could not see the error. It was just not possible the board didn't come with some kind of minimal MCLR circuit.
Thanks. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
ezflyr
Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA
|
|
Posted: Mon Dec 09, 2019 10:04 am |
|
|
Hello Gabriel,
I was bitten by a similar oversight by the Sparkfun 'engineering' staff a few years ago while working with one of their Cellular development boards. After several days, I could not get it to work as intended, so I dug out the manufacturers hardware development guide and found numerous departures from the recommended circuits. I modified the Sparkfun board to comply with the manufacturers recommendations, and voila!, everything began to work as expected!
Lesson learned!
In general, I like Sparkfun & their products, but this experience reinforced the notion that there is a BIG difference between a 'maker' and an 'engineer'!
As Ronald Reagan said "trust but verify"! _________________ John
If it's worth doing, it's worth doing in real hardware! |
|
|
|