
@Adam Equipment Company 2004
15
3. Microcontroller and associated digital components
The microcontroller used is a Philips 87LPC764 in a 20-pin DIL plastic package. This
interfaces with the other areas of the circuit as follows:
Using a serial I
2
C-compatible bus, the controller interfaces to a Philips PCF8576 display
driver chip (see below) and also to a 24C01 serial EEPROM containing 1 Megabit (256
Kbytes) of non-volatile memory. The serial clock (SCL) and serial data (SDA) lines are
pulled up to the digital 5 volt supply by resistors R14 and R15.
The port pins #1 and #17 are configured as output and input respectively, and are used to
interface the controller to the power control and monitoring circuitry as described above.
The port pins #20 and #8 are configured as output and input respectively, and are used to
interface the controller to the analogue to digital converter circuitry as described above.
Port pins #13, #14 & #15 are configured as inputs and used to detect key presses from the
[Tare], [Units] and [Cal] switches. These inputs are normally pulled high by resistors R11,
R12 & R13 and are then pulled low when a switch is pressed, which connects the input to
ground. The [On] and [Off] switches are connected directly into the power supply control
circuitry, and are not interfaced via the controller.
Port pin #2 is configured as an output, which is used to drive a buzzer via transistor Q3.
Since the reset state for all outputs on the controller is high, a PNP transistor connected to
the digital 5 volt supply is used, so that an output high state turns the buzzer off and
setting the output low turns the buzzer on.
Port pins #3 and #4 are connected via linkable headers to ground, and can be read by the
software for configuration or security purposes. If no link is fitted to the header, the inputs
are pulled high by internal pull-up resistors.
Pins #6 and #7 are left unconnected, as the internal 6MHz clock is used in this application.
4. LCD display and driver
The microcontroller is interfaced to the custom LCD display via a Philips PCF8576 display
driver chip, using the serial I
2
C bus. The serial data is converted to parallel data to drive
the display segments and backplanes. Since the display has 47 separate segments, and
the driver can only drive 40 segments on each backplane, the display has 23 segments
commoned to COM1, which is connected to the backplane #0 driver pin (BP0) and 24
segments commoned to COM2, which is connected to the backplane #1 driver pin (BP1).
The value of resistor R16 determines the clock rate for the display, a value of 150 kilohms
giving a clock frequency of about 100 kHz.
The interconnections between the segment driver output pins of the display driver and the
segments of the display are chosen for ease of programming, with each of the four 7-
segment digits and its associated decimal point being connected such that the data bits to
drive its segments all reside in the same display driver data byte.