ZBasic Language Reference
178
ZBasic Microcontrollers
17
Port A, bit 3 and Port B, bit 0
Port A, bit 3 and Port E, bit 1
18
Port A, bit 2 and Port B, bit 2
Port A, bit 2 and Port E, bit 2
19
Port A, bit 1 and Port B, bit 3
Port A, bit 1 and Port E, bit 3
20
Port A, bit 0
Port A, bit 0
21
+V out or +V in (regulated)
+V out or +V in (regulated)
22
Reset (in and out)
Reset (in and out)
23
Ground (common with pin 4)
Ground (common with pin 4)
24
+V in (unregulated)
+V in (unregulated)
Pin 1, Serial Output
This is the output pin for serial channel 1 and Debug.Print. The voltage swing is approximately 0V to the
supply voltage (+5V if using the on-board regulator) and can supply a maximum of 25mA of current. Note
that the voltage swing does not meet the specifications for the RS-232 standard but it will be properly
recognized by most modern serial interfaces.
This pin should be connected to pin 2 of a DB-9F serial connector.
Pin 2, Serial Input
This is the input pin for serial channel 1. It will tolerate a voltage swing from 15V to +15V allowing it to
be connected to an RS-232 output from a serial device.
This pin should be connected to pin 3 of a DB-9F serial connector.
Pin 3, ATN
This input is used for signaling the ZX to enter the download mode. If you dont need to download, no
connection is required but you may wish to ground this pin to eliminate the possibility of spurious resets
caused by electrical noise.
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 (ATmega)
In addition to being a general input or output pin, on an ATmega 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 (ATmega)
In addition to being a general input or output pin, on the ATmega 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.
|