ZBasic Language Reference
133
ZX Microcontroller Family
For downloading, this pin should be connected to pin 4 of a DB-9F serial connector. Note that some
operating systems (particularly Windows XP) tend to toggle the DTR serial port line, to which this input is
normally connected, during the booting process. Every positive transition on this input will cause the ZX
to reset.
Pin 4, Ground
This is the ground connection for the serial port and is common with pin 23. This pin should be
connected to pin 5 of a DB-9F serial connector.
Pin 5, Port C Bit 7 and Port B Bit 1
In addition to being a general input or output pin, a signal may be applied to this pin to serve as the clock
source for Timer 1. Port C Bit 7 must be an input for this to work properly. Alternately, if no external
signal is connected, Port C Bit 7 may be an output and serve as the clock source for the timer.
Pin 6, Port C Bit 6 and Port D Bit 2
In addition to being a general input or output pin, a signal may be applied to this pin to serve as external
Interrupt 0. Port C Bit 6 must be an input for this to work properly. Alternately, if no external signal is
connected, Port C Bit 6 may be an output and serve as the source for the interrupt.
Pins 7-10, Port C Bits 5-2
These pins may be used as general inputs or outputs.
Pin 11, Port C Bit 1 and Port D bit 3
In addition to being a general input or output pin, a signal may be applied to this pin to serve as external
Interrupt 1. Port C Bit 1 must be an input for this to work properly. Alternately, if no external signal is
connected, Port C Bit 1 may be an output and serve as the source for the interrupt. Additionally, this pin
serves as the SDA line when using I2C channel 0.
Pin 12, Port C Bit 0 and Port D bit 6
In addition to being a general input or output pin, a signal may be applied to this pin to serve as the input
for the InputCapture() routine. Port C Bit 0 must be an input for this to work properly. Additionally, this
pin serves as the SCL line when using I2C channel 0.
Pins 13-17, Port A Bits 7-3
In addition to being general digital input or output pins, these pins may be used for analog input to the
analog-to-digital converter. The analog voltage may be read using the GetADC() routine.
Pin 18, Port A Bit 2 and Port B Bit 2
In addition to being a general digital input or output pin this pin may be used for analog input to the
analog-to-digital converter. Alternately, a signal may be applied to this pin to serve as external Interrupt
2. Port A Bit 2 must be an input for this to work properly. Moreover, if no external signal is connected,
Port A Bit 2 may be an output and serve as the source for the interrupt. A second alternate use for this
pin is as the analog comparator input. See the Atmel documentation for the AIN0 input for more details.