LCD has mind of its own

Status
Not open for further replies.

MrDEB

Well-Known Member
Have a PIC circuit with LCD connected but when I power down the circuit and power up again the LCD sometimes displays several squares instead of desired display. The circuit is functioning as the LEDs are indicating proper operation but the LCD isn't
THINKING perhaps a .1uf across the power supply pins of the LCD?
using 4 data pins with Swordfish module
 
if the led shows black squares then it isn't initialized. Look out for the timing and right sequence when initting the LCD
 
How about having a delay at the start of the program which gives the power supply time to stabilise and the LCD time to (internally) initialise?

A decoupling cap across the pins of the LCD certainly won't do any harm.
 
Last edited:
now to figure out a delay?
I kinda figured it was something with the power supply
 
Because it will be at the start of your program, the delay timing isn't essential.

Something like 100ms should be fine.
 
Last edited:
Swordfish has a built in delay that's run before it set's up the LCD

You can change it with

Code:
#option LCD_DATA = PORTD.4
#option LCD_RS = PORTE.0
#option LCD_EN = PORTE.1
#option LCD_INIT_DELAY =1000

It don't have to be 1000
 
Last edited:
I would have never guesed that Swordfish has such a delay.
Will try that out before adding some capacitors to the power supply (power supply is switched with a relay controlling the 110vac line)
relay contact noise??
 
retracing problems

I think I found one of my problems. Has something to do with the mosfet section?
I connected pic circuit to 9v battery and all works well (added the option that Bebe suggested)
suggestions on a better method to connect mosfet as I keep getting voltage errors when its connected to circuit.
At present I had it connected to Vcc directly until I confirm that my code works (hacking at it trying to integrate a counter)
 
If anyone manages to work out that schematic, please explain it to me. I can't figure out how Gnd, 12VAC and -12V can be the same or how a mosfet works with AC!!



Mike.
 
I gave up on that one myself I would let the pic control the power and sleep when it's turned off and forget all that nonsense
 
The connections your refering to

are buss connections. On one sheet it has for example 12vac-b on the second schematic it has 12vac-b as well. This indicates a connection between schematic sheets.
I just woke up and was thinking about this circuit and why now when running it on a 9v battery it all of a sudden LOCKS UP the LCD. The 9v battery must be going below 7v.
Will post entire schematic as well as a description.
 
Hopefully you can see this clearly?

Here is the entire schematic. the sheet buss connections should make sense hopefully.
The power supply description - in this schematic version I show two transformers, one is a 24vac output while the 12vdc cube is second. In my revision schematic I am going to use only one transformer (use what I have)
you depress PB1 which activates the 12vdpdt relay. this turns on the two transformers.
when the pic is powered up RC6 turns on the Mosfet (presently just connecting 5v until I get the RC6 code section working right using an LED for indication)
the 24vac is used to heat the soldering iron heater.
The 555 is an "indicator" to let me know the unit is "ON". This is located under the bench (allows more bench area as the main PIC circuit is located hanging from a shelf(very small and light weight)
one the pic schematic RC4 is a micro switch that senses when the iron is in use. If not used in say a ten miniute period the entire unit including the transformers are turned off.
The piezo is a 3v unit that is connected to port RC5 to indicate that ten minutes is almost up./
The power supply works as does the PIC until now after I started connecting the two together. It works most of the time but not always. That leads me to think something with the power supply.
Yesterday I started powering the PIC with just a 9v battery and it was working until the LCD started acting up. Thinking the 9v battery was going below 7v. Today going to reconnect a 12v dc wall wart again. The pic circuit worked flawlessly with it.
Process of elimination?
 
Going back to square one
Redo the pcboard as it has lots of corrections and some of the pads could be bigger.
I powered up the board with a dc wall wart 200ma 7.5vdc output and all I get are white squares.
suspect LCD issues as well.
Hopefully by redoing the board I can correct many revisions and mistakes.
waving a white flag
 
Its a 555 timer. I am flashing the two leds back and forth to indicate that the power supply is ON
Redoing the pcboard as I still get all white squares. Tried desoldering the LCD but figure why bother. Just redo the entire board and eliminate corrected traces etc.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…