ZX81NV Micro Computer

                        Revised Oct 24,1998

                          (c) wilf rigter

 

INTRODUCTION

------------

The ZX81NV is an all CMOS ZX81 (no video) compatible controller.

ZX81NV's simplicity and low power (>10 ma) consumption make it suitable

for robotics and other control applications.

It is specifically designed for ZX81 users since it is programmed via

the ZX81 rear edge connector. While it is plugged in ( with it's own

Z80 chip removed), the ZX81NV behaves as a 32K memory pack and I/O

board, including an interface for a full size keyboard, ATARI joystick

and LCD display. Once the program is developed using the ZX81 (or if you

prefer, using Carlo Delhez's XTender emulator and ZXTAPE to download),

the ZX81NV is unplugged and a Z80 chip is plugged into the ZX81NV CPU

socket. When the ZX81NV is powered back up the ZX81 BASIC program will

automatically execute.

 

ZX81NV OVERVIEW

---------------

The ZX81NV consists of a CMOS Z80, 32K of battery backed up CMOS RAM,

a CMOS 8255 with 24 I/O lines, and one each 74HC251 and 74HC02 chips.

The MC34164 power supervisor provides reset when Vcc falls below 4.5V.

One feature is the FLASHRAM system memory used instead of EPROM which

makes the ZX81NV a universal Z80 controller suitable for other Z80

operating systems. Program code is normally stored in the 0-8K and 40-48K

blocks which are non-volatile and write protected. The read/write data is

stored in the 16K-32K block. The memory map is flexible, for example, the

40-48K block can be relocated in the 8-16K read/write area.

The 24 I/O pins are provided by a 82C55 with three 8 bit programmable ports.

Port A can be used to interface with a ZX81 compatible 40 contact keyboard

matrix. Port C is connected to a 14 pin header compatible with HD44870 LCD

modules. The ZX81NV can use Port B and C to closely emulate a bi-directional

PC compatible printer port. If the ZX81NV requires more I/O capability,

digital and analog I/O expansion units can be attached to the ZX81NV printer

port. Alternatively, ZX81 compatible devices can be attached to the unit's

ZX81 expansion bus.

 

CIRCUIT DESCRIPTION

-------------------

The overall ZX81NV circuit details are shown in the schematic FIG 1.

 

CRYSTAL OSCILATOR CIRCUIT

-------------------------

The circuit shows how the 4MHz CPU clock is generated. This is

a text book CMOS Colpits oscillator using one section of the 74HC02 NOR

gate as an inverter with the crystal in the feedback path.

 

CPU/MEMORY

-----------------

The ZX81NV uses a CMOS Z80A CPU for reduced power consumption.

Details of the CPU functions can be found in the ZILOG literature.

The 62256 RAM chip which is also low power CMOS, uses a 3V lithium

cell for non-volatile program storage. Note the novel use of a common

Vdd line and the negative battery connection to the RAM Vss line.

This ensures that the RAM CE and WR lines are disabled by automatically

switching to Vdd during power-down. In addition, the MC34164 supervisory

circuit of Q1 pulls the reset line low when Vcc falls below 4.5V.

The 74HC251 address decoder provides ZX81 memory mapping and write

protection for the ZX81NV. The standard memory map is as follows: 16K of

program memory from 0K-16K is write protected during normal program

execution and the 16K-32K block is always accessible as read/write RAM.

The RAM works with most HIRES video display software including WRX16.

 

I/O MAP

-------

The 8255 is a general purpose parallel I/O port. The 8255 defaults to

3 input ports on reset and to configure ports for output, a control word

must be written to the control register located at address 7F.

Port B at address 77 is generally used as a bi-directional printer port.

Port A at address 76 is generally used as a forty contact keyboard port.

Port C at 7E uses 2 control and 4 data lines for a HD44870 LCD port.

A, B and C can of course be used for any general purpose parallel I/O.

 

Note: Port C output bits can be accessed at two different locations.

Port C is accessed at 7E, but in addition, individual Port C bits can be

set or reset at address 7F with control word values 00 to 0F. Even values

02 to 0E reset bits 0 to 7 respectively and odd values 01 to 0F set bits

0 to 7.

 

ROWS AND COLUMNS

----------------

The ZX81NV has a ZX81 keyboard interface to connect to a full size keyboard

or other contact input devices like an ATARI joystick. It uses the A8-15

lines to scan 8 rows and the five column data lines are connected to bits

D0-4 of Port A at I/O address 76. In order to use the address lines for

scanning the keyboard rows we can use the Z80 IN A,(C) opcode to

successively read 8 X 5 bits of column data on Port A by rotating a low bit

through the B register. This opcode uses the C register to address the I/O

port on the A0-A7 lines while the B register appears simultaneously on the

A8-A15 lines. The three other bits (D5-7) can be used to expand the matrix

to 64 keys or used for ZX TAPE input and a bit banger UART application.

 

CONCLUSION

----------

With only five chips the ZX81NV rivals the ZX81 for simplicity and easily

beats it on the power front. The high degree of compatibility makes it

possible to program the ZX81NV in ZX81 BASIC for control applications.

The full power of this unit is realized both as an accessory while plugged

into the ZX81 or as a Z80 controller in standalone applications.

 

Well that covers the ZX81NV circuit design, in the next installment we

will explore the software.

-------------------------------------------------------------------------

 

                                                     1N4448   KEY MATRIX

       0V           5V          5V              A8 ----|<------|-|-|-|-|-

        |           |           |               A9 ----|<------|-|-|-|-|-

RESET -|          [10K]      ___|___            A10----|<------|-|-|-|-|-

        |___________|_______|MC34164|           A11----|<------|-|-|-|-|-

        |          +|       |_______|           A12----|<------|-|-|-|-|-

        |      1 uF===          |               A13----|<------|-|-|-|-|-

        |           |           |               A14----|<------|-|-|-|-|-

        |          0V          0V               A15----|<------|-|-|-|-|-

        |                                             +5V      | | | | |

        |       POWER SUPERVISORY CIRCUIT           ___|__     | | | | |

        |              __                     _____|RST   |    | | | | |

        |_____________|02 \__________________|     |   PA0|____| | | | |

                |     |__ /                        |   PA1|______| | | |

                |                                  |   PA2|________| | |

       +5V      |      +5V                         |   PA3|__________| |

      __|__     |    ___|___                       |   PA4|____________|

     | Vdd |    |   |  Vdd  |                      |   PA5|__ SERIAL IN

     |     |    |___|RST    |                      |      |

     |   D0|________|D0     |______________________|D0 PA7|__ TAPE IN

     |   D1|________|D1     |______________________|D1 PC1|__ SERIAL OUT

     |   D2|________|D2     |______________________|D2    |

     |   D3|________|D3     |______________________|D3    |

     |   D4|________|D4     |______________________|D4    |

     |   D5|________|D5     |______________________|D5    |

     |   D6|________|D6     |______________________|D6    |

     |   D7|________|D7     |______________________|D7    |

     |     |        |       |                      |      |

     |62256|        |  Z80  |        __     __     | 8255 |

     |     |        |     A7|-------|02 \__|02 \___|CS    |

     |     |        |   IORQ|-------|__ /  |__ /   |      |

     |     |        |       |                      |      |

     |   A0|--------|A0   A0|----------------------|A     |     LPT1

     |   A1|--------|A1     |                      |   PB0|-----  D0

     |   A2|--------|A2     |                      |   PB1|-----  D1

     |   A3|--------|A3   A3|______________________|B  PB2|-----  D2

     |   A4|--------|A4     |                      |   PB3|-----  D3

     |   A5|--------|A5  INT|___                   |   PB4|-----  D4

     |   A6|--------|A6   A6|___|                  |   PB5|-----  D5

     |   A7|--------|A7     |                      |   PB6|-----  D6

     |   A8|--------|A8 WAIT|__ +5V                |   PB7|-----  D7

     |   A9|--------|A9 BREQ|__ +5V                |   PC0|----- STB

     |  A10|--------|A10 NMI|__ +5V                |   PA6|----- ACK

     |  A11|--------|A11    |                 +5V _|Vcc   |

     |  A12|--------|A12 VSS|-- 0V      +5V    0V _|Vss   |     LCD

     |  A13|--------|A13    |           |          |   PC2|----- RS

     |  A14|--------|A14    |         [10K]        |   PC3|----- E

     |     |        |   MREQ|___________|          |   PC4|----- D0

     |     |        |       |           |          |   PC5|----- D1

     |   WR|---*----|WR  CLK|________   |          |   PC6|----- D2

     |     |        |_______|        |  |          |   PC7|----- D3

     |     |                         |  |          |______|

     |     |     1 uF +              |  |           _______

     |  VSS|-----+--)|---------- 5V  |  |          |  251 0|_*__/ _ RD

     |     |     | 1N34A BATTERY     |  |__________|E     1|_*__/ _ 0V

     |     |     |-->|---------- 0V  |             |      2|_______ 0V

     |     |     | 1N34A BACK-UP     |    A13 _____|A     3|_______ 0V

     |     |     +-->|----[3V]+- 5V  |    A14 _____|B     4|_*__/ _ 0V

     |   CE|___                      |    A15 _____|C     5|_*__/ _ 0V

     |   OE|___|___________________  |  ___________|Z     6|_______ 0V

     |_____|                         |         ____|Y     7|_______ 0V

                                     |        |    |_______|

  __|-|___                           |        |

 |  |-|   |                          |        |--------->|---- RAMCS

 |  4Mz   |                          |        +--------->|---- ROMCS

 |-[10M]--|                          |

 |   __ [2K]                         |               _________

 +--|02 \_|__________________________|      +5V ____| LM2930  | ___ +6V

 +--|__ / |                                      |  |_________|  |

 |        |                                      | +     |     + |

 ==      ===                                10uf===      |      ===10uf

 |        |                                      |       |       |

 0V      0V                                      0V     0V      0V

 

                                Figure 1