Sinclair ZX Spectrum Service Manual
Spectrum For Everyone https://spectrumforeveryone.com/
19
c) The 0.6ms delay between the PIC returning to the idle state (CORRECT) and the Z80 setting TXD
high (GO). If the delay is exceeded the keypad assumes that the Z80 has been reset and resets
itself (i.e. returns to the start of the sequence).
d) The 1ms delay between the Z80 setting TXD high (SET) and the PIC responding by putting TXS
low (CORRECT). If the delay is exceeded, the Z80 assumes that some other device is connected,
and abandons the reset sequence.
1.9.2 Bit Transfer Protocol
The protocol for transferring a single bit from the PIC to the Z80 (as seen at the RS232 connector) is
shown below:
The significant levels and time delays are as follows:
a) At the start of the transfer the Z80 polls TXS which should be idling low. If not the Z80 assumes
that some other device is connected and abandons the transfer.
b) Having detected that TXS is low the Z80 sets TXD low (ATTENTION) and waits for the PIC to
respond with READY. If READY is not received within 15ms, the Z80 assumes that the keypad has
been disconnected and abandons the transfer.
c) After setting READY high the PIC polls RXS waiting for START. If not received within 0.2ms the
PIC assumes that the Z80 has been reset, and resets itself.
d) On receiving START the PIC leaves TXS high if it wants to send a ‘0’ data bit, or puts it low to
send a ‘1’ (STARTED).
e) Having received the data bit, the Z80 sets TXD low (STOP); the PIC responds with TXS high, if not
already so (STOPPED).
f) Having responded with STOP, the PIC waits for the Z80 to set TXD high (STAND EASY); the PIC
responds by setting TXS low ready to transfer the next data bit. If the Z80 does not respond with
STAND EASY within 1.3ms the PIC assumes that the Z80 has been reset, and resets itself.