Re: Problem with PIC & LCD display



On Thu, 1 May 2008 21:08:07 +0100, Steve H <steveu@xxxxxxxxxxxxxxxx>
wrote:

In message <gp6k14lkhns618g04kgnh3gdiaiipgsn9p@xxxxxxx>, Spehro Pefhany
<speffSNIP@xxxxxxxxxxxxxxxxxxxxxxx> writes
On Thu, 1 May 2008 17:51:39 +0100, Steve H <steveu@xxxxxxxxxxxxxxxx>
wrote:


I'm having a problem with a fairly simple project incorporating a
16F877A PIC and a 4x20 alphanumeric display module. The circuit
interfaces with other logic ICs, though these can be removed from the
circuit to isolate the problem.

The circuit is fed, under test conditions, from a linear 12v power
supply. The 5v regulator on the circuit board is decoupled using 100nf
ceramic capacitors. There is similar decoupling on the PIC itself, and
at other places e.g. decoupling the 5v supply on the connector to the
LCD display. I have also fitted a 100uH coil in the supply to the 5v
regulator to reduce any effects from spurious noise on the supply line.

The problem I'm having difficulty solving is that the display will
intermittently go blank. It will go blank, seemingly when the display is
written to by the PIC, either (a) due to a spike/noise on the mains
supply (this can be intermittently reproduced by repeatedly turning on
and off a piece of mains powered equipment on the same circuit), or (b)
when the 0v rail (not even necessarily close to the LCD display) is
touched by for example a multimeter probe. This is the most consistent
way of producing the fault. The multimeter can be turned off and the
other probe not connected to anything for this to happen. The PIC
doesn't appear to be affected by any of this as it can be shown to still
be operating as expected.

Are you sure it's not resetting?


I'm certain the PIC isn't resetting - the LCD module is going blank but
the PIC continues to function. It appears the intelligent LCD module
locks up/resets itself.


I've experienced similar issues before in my limited experience of
building small projects with PICs. I had issues with a 16F84A resetting
itself when the 0v rail close to the IC was touched with a screwdriver.

Can anybody suggest what vital consideration for circuit design I'm
missing. I'm at a bit of a loss as to what I'm doing wrong.

Thanks.

What else EXACTLY is this PIC circuit connected to (off board in
particular)? How long is the cable to the LCD display? What kind of
equipment is this? Can you link to a photo? Is it a proper PCB or a
plugboard?

Have no photo to hand and the equipment isn't with me just now. Fully
assembled it comprises the PIC with LCD, 4 control buttons and several
logic inputs/outputs, four of which control 4 to 16-line latches that
switch solenoids via darlington drivers. The unit is part of a gas
sampling multiplexer system.

Is it the solenoids that are mucking things up?

Currently, a lot of the circuitry is disconnected - there are 3
individual PCBs (etched boards). It's working in a bare-bones sort of
state at the moment, pretty much the PIC and display only

Lash-ups tend to be more sensitive to EMI.

An earlier version of the device, identical but utilising in place of
the 16F877A/LCD a pair of 16F84As and driving a 2 x 7segment LED
display, has worked in the field flawlessly for 3 years.


Best regards,
Spehro Pefhany
Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@xxxxxxxxxxxx Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
.