ZCLK~ CALENDAR/CLOCK PACKAGE DOCUMENTATION (Sep84c) Copyright^ 1984 FBE Research Company, Inc. On the advice of counsel, a patent application for the ZCLK~ Calendar/Clock module is being prepared at this time. SECTION 1 - USER'S GUIDE DESCRIPTION ZCLK~ is a calendar/clock circuit board for the Z-100~ series of desk-top computers. It installs on the Z-100~ main cir- cuit board and does not require an S-100 bus expansion slot. Installation is simple and will not permanently alter the Z100~ computer. ZCLK~ shares the 68A21 Peripheral Interface Adaptor IC (U114) used by the Z100~ for the Parallel Printer Interface (and other things). With ZCLK~ installed, the ability of the com- puter to sense the state of the printer /ERROR line is lost. This is of little consequence since most software does not check for this error and, if any did, the ZCLK~ would return a no-error state. Most printers have an alternate means of indicating error conditions as well. ZCLK~ uses the popular OKI Semiconductor MSM5832 micropro- cessor real-time clock and calendar IC. The MSM5832 contains registers as follows: TIME MONTH DATE YEAR WEEKDAY ----------------------------------------------- 23:59:59 12 31 99 7 A long-life lithium battery maintains the date/time in the ZCLK~ during computer-power-off periods. ZCLK~ CIRCUIT BOARD INSTALLATION When the ZCLK~ is installed, the 68A21 Peripheral Interface Adaptor (PIA) IC (U114) on the Z-100~ main circuit board is removed from its socket and installed in the socket labeled U114 on the ZCLK~ circuit board. The ZCLK~ board then plugs into the PIA socket on the Z-100~ main circuit board. To perform the installation, follow the step-by-step pro- cedures applicable to your model of Z-100~ (All-In-One or Low-Profile) as listed on the following page. WARNING Do not short the battery. Battery power conductors are ex- posed on the ZCLK~ circuit board. Do not lay the ZCLK~ on an electrically conductive (metallic) surface! Shorting the battery may cause it to burst or release dangerous materials. ALL-IN-ONE INSTALLATION PROCEDURE 1. Unplug the Z-100~ line cord from the AC outlet. 2. Remove the cabinet top as shown in the Zenith manual. 3. Remove the rear screw of each cover latching slide. 4. Pivot each slide outward. 5. Remove the five screws which hold the drive/video subassembly to the to the base assembly. 6. Carefully lift the drive/video subassembly up and to the front of the computer about 4 or 5 inches and set it back down. 7. Unplug the signal/power cable from the video board. 8. Unplug the disk controller cable from the H/Z207 board. 9. Unplug the power cable from each disk drive. 10. Remove the drive/video subassembly and set it aside. 11. Proceed to FINAL INSTALLATION, on the next page. LOW-PROFILE INSTALLATION PROCEDURE 1. Unplug the Z-100~ line cord from the AC outlet. 2. Remove the cabinet top as shown in the Zenith manual. 3. Remove the four screws and two locking pins that hold the drive subassembly to the base assembly. 4. Carefully lift the drive subassembly up and to the front of the computer about 2 inches and set it back down. 5. Unplug the disk controller cable from each disk drive. 6. Unplug the power cable from each disk drive. 7. Remove the drive subassembly and set it aside. 8. Proceed to FINAL INSTALLATION, on the next page. FINAL INSTALLATION WARNING! Some of the integrated circuits used in the ZCLK~ and in the Z-100~ are sensitive to static electricity and may be permanently damaged if mishandled. To minimize the chance of damage, perform the next three steps as carefully as pos- sible. Ground yourself by touching the computer chassis dur- ing the first three steps. 1. Locate U114 on the Z-100~ main circuit board (it's near the Power Supply and S-100 Bus card cage). Carefully remove the 68A21 IC from its socket. Use an IC removal tool or a small screwdriver. Hold the IC in your hand and do not lay it down on your work surface. 2. Carefully align the pins of the 68A21 IC with the empty socket on the ZCLK~ board. Make sure that the Pin 1 end of the IC is towards the short edge of the ZCLK~ board nearest the socket. The Pin 1 end of the IC is indicated by a "dot" or "cutout" on the top of the IC. Push the 68A21 into the socket. Make certain that none of the pins "rolled under" when the IC was pushed in. If any did, remove the IC, straighten the pin, and try again. 3. Position the ZCLK~ board such that the pins of P114 (on the back of the ZCLK~ board) align with the now empty socket at U114 on the Z100~ main circuit board. Push the ZCLK~ firmly into the socket, making sure that the pins are fully inserted. Support the main circuit board by placing your finger under U114 as you push the ZCLK~ into the socket. 4. Locate Jumper "J" on the ZCLK~ circuit board (it's near the battery). If the jumper is a soldered-in piece of wire, perform step "B" otherwise perform step "A." A. Remove the jumper-block from whichever pin it is on and reinstall it so that it contacts both pins. B. Remove the insulating paper from beneath the upper battery holder contact and discard. This step connects connects battery power to the ZCLK~ board circuitry. 5. Inspect the installation. Verify that the pins of P114 on the ZCLK~ are properly inserted into socket U114 on the Z-100~ main circuit board. Verify that the pins of the 68A21 IC are properly inserted into socket U114 on the ZCLK~ circuit board. Correct any problems before proceding. This completes the installation of your ZCLK~. Now, put the computer back together by reversing the disassembly process and procede to SOFTWARE INSTALLATION on the next page. ZDOS~/MS-~DOS SOFTWARE INSTALLATION Bootup and copy ZCLK.COM from the distribution disk onto your bootable system disk. For automatic date/time setting on bootup, your bootable system disk must have an appropriate AUTOEXEC.BAT file. If your system disk does not have this file, one is provided for you. Copy it from the distribution disk to your system disk. If your system disk already has an AUTOEXEC.BAT file, use an editor (e.g., EDLIN) to add the command line "ZCLK" to the file and remove the "DATE" and "TIME" command lines, if they exist, from the file. SOFTWARE OPERATION When the ZCLK.COM program runs, it reads the date/time from the ZCLK~, sets the Z-DOS~/MS-~DOS date/time, and displays the date/time on the console. Type ZCLK[RETURN] to run the program. If the date/time from the ZCLK~ is not acceptable to ZDOS~/MS-~DOS, the "bad" date/time will be displayed along with a request that the ZCLK~ be reset (see next paragraph). ZCLK.COM is also used to set the correct date/time into the ZCLK~ and to process a Daylight Saving Time adjustment. Type ZCLK[SPACE][RETURN] to display operating instructions for the program. If the ZCLK~ contains a "bad" date or time, display and read the instructions and then set the correct date/time into the ZCLK~ board. CP/M-~86 SOFTWARE The source file for a CP/M-~86 version of ZCLK.COM is sup- plied on the ZDOS~/MS-~DOS distribution disk. Use the RDDOS utility program to copy the files ZCLK86.A86 and READ.ME to your CP/M-~86 system. Consult the READ.ME file for details. CP/M-~85 SOFTWARE Software for CP/M-~85 is not included with the ZCLK~ because CP/M-~85 does not support a system-level date/time function. However, a CP/M-~85 version of ZCLK.COM is available. To obtain a copy, send $5 to FBE Research Company, Inc., P.O. Box 68234, Seattle, WA 98168. Include your mailing address and request the ZCLK~ CP/M-~85 Support Disk. SOFTWARE LICENSE The programs that you receive with your ZCLK~ calendar/clock module are yours. There is no license agreement. However, the programs are copyrighted and you may not sell exact copies of the programs for profit. You may modify the pro- grams and sell the results as long as you include our copy right notice. SECTION 2 - PROGRAMMER'S INTERFACE This section provides the information needed to write a pro- gram which directly accesses the ZCLK~ board. The informa- tion applies to either microprocessor used in the Z-100~. PERIPHERAL INTERFACE ADAPTER The ZCLK~ interfaces to the Z-100~ through the 68A21 Periph- eral Interface Adaptor (PIA) used for the parallel printer interface. The PIA contains two Data/Direction Registers and two Control Registers. All registers are read/write and are addressed as I/O ports as follows: I/O Port Name Function -------------------------------------------------- E0 ADATA A Data/Direction Register E1 ACTL A Control Register E2 BDATA B Data/Direction Register E3 BCTL B Control Register The Data Register bits connect to pins of the PIA and are identified as PA0-PA7 and PB0-PB7. Each pin may be an input or an output as programmed by the Direction Registers. To access a Direction Register, set bit 2 of the associated Control Register to zero. Each bit of the Direction Register applies to the like bit of the Data Register. A zero bit in the Direction Register programs the Data Register bit as an input. A one bit programs an output. To access a Data Reg- ister, change bit 2 of the Control Register back to a one. The ZCLK~ uses the data bits of the PIA as follows: PIA Bit Signal Name ZCLK~ Function -------------------------------------------------- PB1 /ERROR ZCLK~ Enable (Low Active) PA0 PD1 READ Strobe (Low Active) PA1 PD2 WRITE Strobe (Low Active) PB2 PD3 Address Counter Clock PB4 PD5 Data Bus Bit 0 (LSB) PB5 PD6 Data Bus Bit 1 PB6 PD7 Data Bus Bit 2 PB7 PD8 Data Bus Bit 3 (MSB) INITIAL STATE Initially, bit 2 of both Control Registers is set to a one which allows access to the Data Registers. The Z-100~ mon- itor program initializes the PIA such that PA0, PA1, and PB2- PB7 are outputs and PB1 is an input. ACCESSING THE ZCLK~ BOARD Until access is enabled, the ZCLK~ will not respond to the READ (PA0) or WRITE (PA1) Strobes or other signals present on the PIA pins it shares with the printer interface. To enable access the ZCLK~ perform the following steps: 1. Set bits PA0 and PA1 in the A Data Register to ones. Do not alter any of the other bits. This causes the READ and WRITE Strobe signals to go high. 2. Set bit 2 of the B Control Register to zero. Do not alter any of the other bits. This allows access to the B Direction Register. 3. Write 0FEH to the B Direction Register. This makes PB1 an output. 4. Set bit 2 of the B Control Register to a one. Do not alter any of the other bits. This restores access to the B Data Register. 5. Write a zero byte to the B Data Register. This enables read/write access to the ZCLK~ board by making PB1 a zero. It also asserts (high) the HOLD signal of the MSM5832, enables the Address Counter, and sets the Address Counter Clock signal (PB2) to a zero. 6. Pause for 150 microseconds or more to allow the HOLD signal to take effect. Note: To set a bit of a register to a one without disturbing any of the other bits, first read the contents of the regis- ter, then "or" the contents with the bit to set and write the contents back to the register. Similarly, to set a bit of a register to zero, first read the contents of the register, then "and" the contents with the complement of the bit to set and write the contents back to the register. DE-ACCESSING THE ZCLK~ BOARD To disable access to the ZCLK~ and to restore the PIA to its "normal" state, perform the following steps: 1. Set bit 2 of the B Control Register to zero. Do not alter any of the other bits. This allows access to the B Direction Register. 2. Write 0FCH to the B Direction Register. This forces the B Direction Register to its original state and makes PB1 an input. 3. Set bit 2 of the B Control Register to a one. Do not alter any of the other bits. This restores access to the B Data Register. ZCLK~ DATA REGISTER CONTENTS The ZCLK~ board uses an MSM5832 clock/calendar IC containing 13 addressable registers defined as follows: Data Bus Addr Name D3 D2 D1 D0 RANGE Notes ------------------------------------------------------------- Seconds 0 S1 * * * * 0-9 S1 and S10 are reset to 1 S10 * * * 0-5 zero on write to address Minutes 2 MI1 * * * * 0-9 3 MI10 * * * 0-5 Hours 4 H1 * * * * 0-9 A=1 for 24 hour format 5 H10 A B * * 0-2 A=0 for 12 hour format Day of Week B=1 for PM B=0 for AM 6 W * * * 0-6 Date 7 D1 * * * * 0-9 8 D10 C * * 0-3 C=0 for 28 day February Month C=1 for 29 day February 9 MO1 * * * * 0-9 10 MO10 * 0-1 Year 11 Y1 * * * * 0-9 12 Y10 * * * * 0-9 All registers are read/write. *, A, B, or C means that data is valid as a one or zero bit. A blank means that the bit does not exist (zero when read and ignored when written). The register address for the MSM5832 comes from the Address Counter (U2) which is held reset when the ZCLK~ is not being accessed (PB1 = 1) so that addressing always starts with register zero after the ZCLK~ is accessed. The Address Counter is advanced by setting bit PB2 to a one and then to a zero. Do not alter PB1 during this operation. READING DATA FROM THE ZCLK~ BOARD The intended procedure for reading the ZCLK~ is to read all 13 registers into a buffer. Since the MSM5832 is in the HOLD state when the ZCLK~ is accessed, the time/date registers will not be updated while they are read. The entire readout process must be completed in one second or less to avoid affecting timekeeping accuracy of the ZCLK~ module. To read the ZCLK~ registers, perform the following steps: 1. Enable access to the ZCLK~ as previously described. 2. Set bit 2 of the B Control Register to zero. Do not alter any of the other bits. This allows access to the B Direction Register. 3. Write 00EH to the B Direction Register. This will keep PB1 an output and make PB4-PB7 inputs. 4. Set bit 2 of the B Control Register to a one. Do not alter any of the other bits. This restores access to the B Data Register. 5. Set bit PA0 in the A Data Register to a zero. Do not alter any of the other bits. This asserts the READ Strobe signal, enabling the contents MSM5832 register currently address by the Address Counter onto the ZCLK~ data bus (bits PB4-PB7). 6. Pause for at least six microseconds to allow the reg- ister contents to stabilize. 7. Read the PIA B Data Register. The MSM5832 register con- tents are in bits PB4-PB7. Reposition and mask the bits as required and store for later use. 8. Set bit PB2 in the B Data Register to a one and then back to a zero. Do not alter any of the other bits. This advances the Address Counter to the next address. 9. Repeat steps 6 through 8 twelve times then de-access the ZCLK~ board as previously described. WRITING DATA TO THE ZCLK~ BOARD Writing to the ZCLK~ is similar to reading. The data to write is assumed to be stored in a buffer. To write to the ZCLK~ registers, perform the following steps: 1. Enable access to the ZCLK~ as previously described. 2. Get the data to be output to the register currently ad- dressed by the Address Counter. Position and mask the data, as required, and output it to bits PB4-PB7, the ZCLK~ data bus, in the PIA B Data Register. Do not alter any of the other bits. 3. Set bit PA1 in the A Data Register to a zero and then back to a one at least one microsecond later. Do not alter any of the other bits. This generates the WRITE Strobe signal. 4. Set bit PB2 in the B Data Register to a one and then back to a zero. Do not alter any of the other bits. This advances the Address Counter to the next address. 5. Repeat steps 2 through 5 twelve times then de-access the ZCLK~ as previously described. Note that registers S1 and S10 (seconds) will be set to zero regardless of the data written to them. SECTION 3 - MAINTENENCE/REPAIR/WARRANTY ACCURACY ADJUSTMENT The timekeeping accuracy of the ZCLK~ is determined by the frequency of a quartz crystal oscillator on the ZCLK~ circuit board. The frequency of this oscillator may be adjusted with trimmer capacitor (C2) on the ZCLK~ board. If the ZCLK~ is running fast, increase the capacitance. If it's running slow, decrease the capacitance. REPLACING THE BATTERY Obtain a replacement battery. Suitable batteries are avail- able from many sources. A Panasonic type BR-2325 is recom- mended. Gain access to the ZCLK~ (see page 2) and follow this procedure: 1. Insert a toothpick or similar non-conductive object into one of the five removal slots around the edge of the battery holder and pry the battery upwards until it clears the edge of the battery holder. 2. Slide the battery out of the holder and discard. 3. Wipe the contact surfaces of the new battery with a soft, clean cloth to remove any contaminants. 4. Lift the top contact of the holder up slightly and slide the new battery in place. SAFETY NOTE: Lithium, the active material of the battery, will burn if exposed to water. Do not mutilate, incinerate or disassemble the battery. Do not attempt to charge the battery. Do not place the battery in water or heat it above 100`C. Do not solder directly to the battery. REPAIR POLICY Should your ZCLK~ require repair, ship it, preferably in its original packaging, prepaid and insured to Repair Department, FBE Research Company, Inc., 11648 Military Road South, Seattle, WA 98168. Include a brief statement describing the problem along with a return address and a telephone number of a technical contact. If your ZCLK~ board is in warranty, enclose a copy of the original sales receipt showing the date of purchase and no charge will be made for the repairs. For out-of-warranty repairs, include a $25 check or money order. This policy is subject to cancellation, modification, or change without notice. REPLACEMENT PARTS LIST ID Component ------------------------------------------------- U1 IC, 74LS02 Quad 2-Input NOR Gate U2 IC, 74LS161A 4-Bit Binary Counter U3 IC, MSM5832 Calendar/Clock R1 Resistor, 100-Ohm