
Input Port
U16 is the input port external to the CPU. The logic levels on the inputs (pins D1-D8) are output to the CPU via
the AD bus while EXINEN is strobed low. All of the user control buttons are input via U16. Also, the battery
type is sensed via U16; a high on signal BATTYPE signifies to the CPU that rechargeable batteries are being
used. If the optional printer head is in the home position. PR HOME will be a logic high.
Pin D8 (RTC_IO) and an output bit of the external output port arc connected. They work as a pair to create a
bidirectional bit for communicating with the RTC (see"Real-Time Clock and Non-Volatile Memory").
Output Port
The output port external to the CPU consists of 2 octal D latches, U18 and U17; they function as a single 16-bit
output port. U18 is the lower byte (LSB) and U17 is the upper byte (MSB). The output of U18 is always
enabled. The output bits of U18 control: audio output, optional printer, RTC, and display.
The signal PR STROBE controls U17s output drivers. Under normal operation, the outputs are tristated and
resistors R148-R154 pull the outputs low. PR STROBE is driven low to turn on the output drivers of U17.
Signals PR DOT0-PR_DOT6 (pins Q1-Q7) drive the 7 print dots of the optional printer. PR STROBE pulses all
7 of the dot lines for a specific time period (see also "Printer Interface"). When the CPU is first powered on, PR
STROBE is in a tristate condition. R123 assures that U17 does not accidentally turn on the printer head dots
until required to. Pin Q8 (RTC_IO) and an input bit of the external input port are connected. They work as a
pair to create a bidirectional bit for communicating with the RTC (see also "Real-Time Clock and Non-Volatile
Memory").
Both bytes of external output port (i.e., U18 and U17) must be written to at the same time. The upper byte of
the output port (U17) cannot be written to independently (see also "Address Decoding").
Real-Time Clock (RTC) and Non-Volatile Memory
The RTC has two functions: (1) it provides non-volatile memory that is used to remember whether the printer
should be enabled at power on, and (2) to keep track of time and date for the N-20P printer. The N-20 does not
require or use the RTC; it is disabled via software.
The RTC chip U29 uses a 3-wire synchronous serial interface to communicate with the CPU. The CPU brings
signal RTC_RST high to activate communication with the RTC. RTC CLK clocks data into and out of the RTC
chip. RTC 10 is the bidirectional communication data bit. The CPU drives RTC 10 when writing data and
commands to the RTC. The CPU tristates RTC 10 and then reads data back on it from the RTC.
Crystal Y1 provides an accurate 32.768 KHz clock input whenever the time keeping circuitry of U29 is
activated. The CPU only enables the timekeeping function when an optional printer is installed. If no printer is
installed, the RTC clock is only used during diagnostic testing to verify the CPU clock timing.
The lithium battery BT1 and diodes CR23 provide the power switch over and constant power needed to keep the
time and RAM data while the unit is not in use. Whenever the unit is powered on, Vcc is at 5 V and U29 is
powered via CR22. CR23 is reverse biased because BT1 at 3 V is at a lower potential than Vcc. Whenever
the unit is powered off, the potential between Vcc and switched ground is 0 V, CR23 is forward biased, and U29
is powered by BT1. CR22 is reverse biased, isolating BT1 from Vcc. This circuit design allows BT1 life of up
to 5 years, typical, without the unit being powered on.
U29 holds 24 bytes of RAM, which is used for non-volatile storage of CPU data.
12-16