Pic Graphics L.C.D. Scope: Ccoonnssttrruuccttiioonnaall Pprroojjeecctt
Pic Graphics L.C.D. Scope: Ccoonnssttrruuccttiioonnaall Pprroojjeecctt
PIC GRAPHICS
L.C.D. SCOPE
JOHN BECKER
Like M-Scope, it also displays frequen-
Long awaited, a PIC and graphics l.c.d. cy and signal amplitude factors as alphanu-
design for monitoring audio frequency meric text lines.
G-Scope also provides sync (waveform
signals has arrived! synchronisation stability) on/off selection,
frequency/voltage monitoring on/off and a
choice of three sampling rates. The lowest
February ’01 issue of EPE con- The EPE Virtual Scope (V-Scope) of
O
UR sampling rate allows sub-Hertz signals to
tained a supplement in which the Jan-Feb ’98 was the most sophisticated of be slowly traced on screen while they
author’s researches into Using this family, interfacing a complex dual- occur.
Graphics L.C.D.s were published. In this channel hardware unit to a PC-compatible The signal source can be a.c. or d.c. and
demonstration (nay, semi-tutorial) article, computer, with a frequency maximum in waveforms up to 5V peak-to-peak can be
various programming routines were illus- excess of 10MHz. input without external attenuation. A simple
trated in conjunction with a specially Micro-PICscope (M-Scope) followed in pre-amp stage can be switched to provide ×1
designed printed circuit board. April ’00, in which a stand-alone unit used or ×10 amplification. The circuit does not
Demos 11 and 12, many of you will an ordinary alphanumerics l.c.d. to display permit negative d.c. voltages to be input.
recall, showed the results of experiments single waveforms on eight of its character
with creating waveform displays on the cells. It was intended principally as a visu- CIRCUIT DETAILS
screen. As the text said, these were created al signal tracer, catering for frequencies in The G-Scope circuit diagram in Fig.1 is
preparatory to designing the PIC Graphics the audio range, up to around 15kHz or so. closely similar to that for M-Scope. One
L.C.D. Scope (G-Scope) described here. October ’00 saw the publishing of the principal difference is the l.c.d. type used,
No doubt EPE will publish other graph- PIC Dual-Chan Virtual Scope (PIC V- in this case a Powertip PG12684 graphics
ics l.c.d. designs in the future, the “dam Scope) which used a PIC-controlled display (X2) – i.e. the same device dis-
having been broken”, so to speak. That is, hardware unit to interface to a PC. It was a cussed when examining the use of graphics
the mysteries of using such devices have considerably easier unit to build than the displays in the Feb ’01 Special
been revealed (and well hidden they were original V-Scope and used a cut-down Supplement.
previously!). The G-Scope, though, is such version of the same PC software. The fre- The second significant difference is that
an obvious application for them, that its quency range was nominally audio, the display requires a negative voltage to
design is inevitably the first to appear. although this extended well above and control the screen contrast. This is provid-
below the human hearing range. ed by the voltage inverter IC4. It is pow-
MULTI-SCOPING ered at +5V, as set by the positive voltage
G-Scope is, in fact, another addition to G-SCOPE regulator IC3, and outputs –5V from pin 5.
the widening family of oscilloscope-type The G-Scope described here is a self- Capacitor C8 sets the frequency at which
constructional projects published contained single channel unit, also catering the inverter operates and C9 smooths the
in EPE over the last nominally for the audio range. Like M- output voltage.
few years. Scope, it is a stand-alone design intended Preset potentiometer VR1 is then used
for visually monitoring signals, but having as a variable resistor to set the current
a greater resolution of the signal flowing through the l.c.d.’s pin 4, so con-
amplitude display. Whereas M- trolling the screen contrast.
Scope used a display area of 8 A further difference is that the display is
× 40 pixels, G-Scope’s controlled by PORTD of the PIC16F877
graphics screen has a microcontroller (IC2), instead of the previ-
pixel density of 64 × ous PORTB. This now allows PORTB to be
128 (vertical × used for the mode switches (S4 to S6), tak-
horizontal). ing advantage of this port’s internal pull-up
resistors in order to use two pushbutton
switches instead of three s.p.d.t. toggles.
The signal to be monitored is input via
socket SK1 to the gain-selecting switch
S2. At this point, the signal routing is
switchable via resistors R1 or R2. The gain
is determined by the value of the selected
input resistor in relation to that of the feed-
back resistor (R3) in the inverting op.amp
circuit around IC1a.
Following R1/R2, switch S3 selects for
d.c. or a.c. coupling, the latter routing
being through capacitor C4. Resistors R4
and R5 provide mid-rail bias (+2·5V) to
the op.amp’s non-inverting input (pin 3).
IN
IC3 OUT +5V
78L05
COM R4 R7 TB1
11 32 3
C3 10k 10k
100n R3 3
+VE +VE +VE
100k 19 10 10
2 PSP0/RD0 D0
RA0/AN0 20 11 11
3 PSP1/RD1 D1
RA1/AN1 21 12 12
AC/DC 4 PSP2/RD2 D2
R1 RA2/AN2/VREF- 22 13 13
5
x10
10k S3
8
*IC1a 6
RA3/AN3/VREF+
PSP3/RD3
PSP4/RD4
27 14 14
D3
X2
D4
2 MAX492 RA4/TOCK1
INPUT 28 15 15 L.C.D.
S2 7 PSP5/RD5 D5 GRAPHICS
1 RA5/AN4/SS 16 16
29
R2 C4 PSP6/RD6 D6 MODULE
SK1 100k 22µ
3 + 30 17 17 PG12864-F
PSP7/RD7 D7
+
x1 4 5 5
WR
15 6 6
T1OS0/T1CK1/RC0 RD
16 7 7
T1OS1/CCP2/RC1 CE
8 17 8 8
RE0/AN5/RD CCP1/RC2 C/D
9 18 9 9 4
RE1/AN6/WR SCK/SCL/RC3 RST CX
10 23 18 18
RE2/AN7/CS SDI/SDA/RC4 FS
C6 24 1
10p SD0/RC5 FG GND
13 25 2
OSC1/CLK IN TX/CK/RC6 1 2
ON/OFF 26 4
RX/DT/RC7 ADC RATE
S1
X1 S4
+ + a
5MHz IC2 INT/RB0
33
C1 C5 D1 PIC16F877-20P 34
C7 RB1
22µ 22µ 1N4148 35 8
k 10p SYNC
14 RB2
OSC2/CLK OUT 36 S5 +VE
PGM/RB3 VR1 2
R6 RB4
37 22k IC4 C+
1k 38 CONTRAST 7660 +
B1 RB5 5 C8
1 FREQ OUT
9V MCLR 39 22µ
PGCLK/RB6 1
40 S6 N.C. N.C.
PGDA/RB7 6 4
N.C. LV C
C2 R5 7
GND GND C9
100n 10k N.C. OSC
22µ+ GND
12 31
0V 3
6
* IC1b
MAX492
N.C.
7 TB2
N.C. *SEE TEXT
N.C.
5 + MCLR DATA CLK 0V
*PROGRAMMER
Fig.1. Complete circuit diagram for the PIC Graphics L.C.D. Scope.
Everyday Practical Electronics, May 2001 321
C4
+ Fig.2. Printed circuit board topside component layout,
INPUT
TO PIC PROGRAMMER
full-size copper foil master pattern and wiring to off-
SK1
R1
(SEE TEXT) board components.
R2 MCLR DATA CLK 0V
S2 S3
x1/x10 AC/DC 2 32IN (58mm)
R5
R
TB2
300
C5 IC1 3 R6
+ k
D1
+ R4
a
C8
IC4 IC2
C9
+ S4 S5 S6
3 36IN (84mm)
C3 7
ADC FREQ
C2 RATE
C6 C7 SYNC
S1 X1
0V
GRAPHIC LCD
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
TB1
FG +5V WR CE RST D1 D3 D5 D7
0V CX RD C/D D0 D2 D4 D6 FS
FG +5V WR CE RST D1 D3 D5 D7
0V CX RD C/D D0 D2 D4 D6 FS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Fig.3. Pinout
TOP FRONT details from
GRAPHIC LCD
the l.c.d. to
the circuit
board.
Assemble in order of component size, starting with link
wires, d.i.l. sockets (IC1, IC2 and IC4), and then upwards in
ascending order. The d.i.l. i.c.s should not be inserted until
after the board assembly and voltage output from IC3 have
been fully checked.
Note that resistors R1, R2 and capacitor C4 are hard-wired
between switches S2 and S3, which are mounted on the front
panel, along with S4 to S6.
The p.c.b. pinout connections for the l.c.d. are in the same
order as those on the l.c.d. module itself (see Fig.3).
Those of you who purchased a graphics l.c.d. in connection
with the “Using them” article will be able to interchange it
between the two units if you used a connector then.
Do not connect the l.c.d. until you know that +5V and –5V are
being correctly delivered by IC3 and IC4, respectively.
ENCLOSURE
The author used a suitable graphics l.c.d. viewing aperture in
a case. He had, however, come very close to rebelling against
this and almost used a case having a see-through lid, mounting
the display immediately below it!
For ease of screen viewing the l.c.d. should face upwards in
the case. This will allow the maximum amount of light to fall on
its transreflective face. Viewing from the side could cause diffi-
culties in a poorly lit workshop. It would be feasible, though, for
a back-lit version (somewhat more expensive) to be used
sideways in a different style of case.
The author cannot advise on back-lit types, other than to com-
ment that many use internal l.e.d.s as the illumination source and
thus probably require a fairly robust power source. Their data
sheets should be consulted on this point. Component layout on the completed prototype circuit board.