Home | AVR | FPGA | M680x | Zilog Z8 | Zilog Z80 | Hitachi SH | Transputer | Linux | DOS

 

Downloads of Z8 apps

Jump to Zilog web site

 

Z8 Multiplexed 11 digit VFD
Domestic Garden Water Controller

The Z86E08, or Z86E04 micro-controller is used in this application to control an 11 digit seven segment Vacuum Fluorescent Display (VFD) module and four solenoid controlled water valves. The circuit also supports a battery backed Real Time Clock (RTC) for all time keeping and alarm events.

The type of VFD used in this controller is a Futaba 11-ST-26ZA Vacuum Fluorescent Display that has eleven 7-segment digits each with a decimal point and semi-colon. This part can be acquired from Jaycar Electronic component distributors (Australian) as part number ZD1880, or from Futaba distributors.

If you happen to have an old VFD calculator in the garage that doesn't work any more then pull out the display part and re-use it on this project. It will work so long as there are at least eleven digits. This number is required because all information about timed event settings is displayed along the full length. If a display having less digits is used then some of that control information will not be displayed.


Contents


Design specifications

Input voltage 8-36 volts DC, or 26 volts AC
Input current 70mA (Typical including display)
130mA (Maximum with all four relays operated)
Display digit count 11 digits maximum
Current per segment 140uA max
Current per digit 1.3mA max. Only one digit is ever on at any instant in time.
No. of switched solenoids 4
Solenoid source current 2.0A
Solenoid type AC
Alarm events 4 ON events - one for each output, and 4 OFF events - one for each output.

General Description

z8water is a program designed to fit into 2K of ROM provided by the Z8E08 "Z8" System On Chip (SOC) devices.

Its purpose is to provide a 24 hour clock from which eight events can be measured against; otherwise named a four channel alarm clock. The events drive four hardware solenoid drivers that can switch on, and off, anything desired. In this application though, it is intended to control four electronic AC water valves.

The system supports an IIC Battery Backed Real Time Clock (RTC) which maintains the current time event during power cycles. It is update automatically whenever the time is changed in software by the user.

Alarm events, however, are not saved into the RTC's NVRAM for safety reasons. That is: they cannot be powered up with random settings read from the NVRAM. Instead all alarm events are powered up disabled with a preset to "24:00". Which is not a valid time and therefore will never match the current time and can be considered disabled.

The safety aspect is attached to primary use this timer is applied to. Since water is precious there must be very few chances of a malfunction that could force a loss of good resources. That is: after power up a random event read from NVRAM compares to the current time forcing a water valve to be switched on.

Display Layout

The following example is a VFD character layout for standard time keeping mode. Current time is displayed in the right most four character places. If either Minutes or Hours advance push buttons are pushed they will modify the current time displayed here.

[A1][A2][A3][A4][ ][ ][ ][TH][Th.][TM][Tm]

Note: The alarm output indicators at the left reflect the actual state of the output. For example: I a output 1 is on then '1' shows at the A1 position. If it is off then nothing shows there.

This layout shows the OFF time of an alarm event. The left most digit "A#"shows the event number (1-4). The word "OFF" indicates that the event relates to switch off the alarm output, while the time is presented at the right most digits.

[A][#][ ][O][F][F][-][AH][Ah.][AM][Am]

An alarm event to switch ON an output is indicated here. The difference is the word "on" showing.

[A][#][ ][o][n][ ][-][AH][Ah.][AM][Am]

Current time, or alarm event time is always shown in the right four character places of the display. And for each display mode (time, alarm event #1, alarm event #2 etc) they can be modified using the minutes and hours advance buttons.

Here is a typical view of how an alarm event is laid out on a display. As can be seen it shows the "ON" time for alarm event #2.

The actual alarm time is 24:00 and represents a disabled event.

Show larger view of VFD

The select button is used to cycle through each of the eight events and the current time. Time being the default position.

Pressing the select button advance the currently displayed event to the next in the series and then back to current time.

Programming Alarms Events

The event list is ordered so that there are two events for each driver output. You can scroll through them by pressing the "select" push button. When the end of the list is reach the current time is shown again. Illustrated here is the order for each ON/Off event belonging to each output driver: 

1 The first shown is the "ON" time and relates to the time an output driver is switched on.
2 The second event shown is the "OFF" time and relates to the time an output driver is switch off.

An ON time should also have a valid OFF time otherwise a driver will not be switched off. When an "ON" event matches the output driver is switched on and a flash number will be shown at the left four places of the VFD display. 

Digit 11 Will show "1" for output driver 1.
Digit 10 Will show "2" for output driver 2.
Digit 9 Will show "3" for output driver 3.
Digit 8 Will show "4" for output driver 4.

Alarm event times programmed into the system will not be saved into NVRAM. If power is removed from the system then they will be lost and default times of "24:00" be used when power is returned.

This is to prevent false times from remaining in the system and allows an easy way to clear down all settings easily.


Z8 (86E04/8) pin allocations are:

P0.0 Clock  I2C output
P0.1 Relay Drive # 0 output
P0.2 Relay Drive # 1 output
P2.0 Micrel Display controller blank (SBLANK) output
P2.1 Micrel Display controller Shift Data (SDATA) output
P2.2 Micrel Display controller Strobe (STROBE) output
P2.3 Micrel Display controller CLOCK (SCLK) output
P2.4 Relay Drive # 2 output
P2.5 Relay Drive # 3 output
P2.6 Spare I/O output
P2.7 Data I/O for I2C I/O
P3.1 Push Button # 0 (Minutes advance) input
P3.2 Push Button # 1 (Hours advance) input
P3.3 Push Button # 2 (Select) input

CPU FUNCTIONAL BLOCK RESOURCE ALLOCATION

Timer-0 Internal 5mS time base tick.
Timer-1 VFD digit persistence timer.
P3.1 input Used as standard input. No interrupts generate on edge transition.
P3.2 input Used as standard input. No interrupts generate on edge transition.
P3.3 input Used as standard input. No interrupts generate on edge transition.
   

Downloads

Download schematic diagram
(84KB PDF file)
Download the schematic diagram showing the full details of the VFD display and solenoid drivers.
Download firmware 'C' source code
(33KB zip)
Download the ZIP archive, extract the files, and go from there. All source, assembled listings and compiled Intel HEX formatted files are present.
Download Datasheet bundle
(1985KB zip)
Datasheets for all components suggested to be used for this design have been bundled together into a single ZIP archive file.
Download Zilog Freeware 'C' Compiler
(2700KB)
Zilog have made their OptiC MSDOS command line driven 'C' cross compiler available for download. This tool can be used to build the 'C' version of source code.

The source code can be compiled using Zilog's Z8 CCP Emulator (Order code: Z86CCP00ZEM) downloadable from www.zilog.com.

To program the Z86E08  you will need to get a hold of a blank chip and a programmer. Zilog also provides these in at least one form: Z8 CCP Emulator (Order code: Z86CCP00ZEM)

If you need a Z86E08 chip supplied and programmed send me an Email.


This page was last updated: Friday, February 07, 2003 14:43 Au EST.

Copyright © C.A.T.E 2001-02