Start Back Next End
  
ZBasic System Library
35
ZBasic Microcontrollers
Analog Comparator Interrupts
The table below shows analog comparator input pins for ZX devices.  See the description of
WaitForInterrupt for more information on preparing to await an analog comparator interrupt.
Analog Comparator Input Pins for ZX Devices
ZX Device
AIN0
Pin
AIN1
Pin
ZX-24, ZX-24a, ZX-24p, ZX-24n, ZX-24r, ZX-24s, ZX-24t
18, B.2
19, B.3
ZX-40, ZX-40a, ZX-40p, ZX-40n, ZX-40r, ZX-40s, ZX-40t
3, B.2
4, B.3
ZX-44, ZX-44a, ZX-44p, ZX-44n, ZX-44r, ZX-44s, ZX-44t
42, B.2
43, B.3
ZX-328n, ZX-328l
12, D.6
13, D.7
ZX-32n, ZX-32l
10, D.6
11, D.7
ZX-1281, ZX-1281n, ZX-1280, ZX-1280n
4, E.2
5, E.3
ZX-24e, ZX-24ae, ZX-24pe, ZX-24ne, ZX-24pu, ZX-24nu, ZX-24ru, ZX-24su
26, B.2
25, B.3
ZX-128e, ZX-128ne , ZX-1281e, ZX-1281ne
18, E.2
17, E.3
ZX-328nu
9, D.6
10, D.7
On the ZX-24 models, AIN0 is common with pin A.2 and AIN1 is common with pin A.0 so these I/O pins
will need to be configured to be inputs in high-impedance mode.  Note, however, that ZX-24 models built
using boards earlier than Rev 5 (see the bottom side of the board), AIN1 has no external connection so
the negative input must be supplied via the analog multiplexor.
The table below shows the analog comparator input pins for generic ATtiny and ATmega targets.
Analog Comparator Input Pins for Generic ATtiny and Atmega Devices
Target Device
Pkg.
AIN0
Pin
AIN1
Pin
tiny24, tiny24A, tiny44, tiny44A, tiny84, tiny84A
P14
12, A.1
11, A.2
Q20
4, A.1
3, A.2
tiny48, tiny88
P28
12, D.6
13, D.7
T28
8, D.6
9, D.7
T32
10, D.6
11, D.7
tiny441, tiny841
S14
10, A.3
9, A.4
Q20
2, A.3
1, A.4
tiny87, tiny167
S20
9, A.6
10, A.7
T32
11, A.6
12, A.7
tiny2313, tiny2313A, tiny4313
P20
12, B.0
13, B.1
Q20
10, B.0
11, B.1
tiny828
T32
10, A.1
11, A.2
tiny1634
S20
8, A.1
7, A.2
Q20
6, A.1
5, A.2
mega48, mega48A, mega48P, mega48PA, mega48PB, mega88, mega88A,
mega88P, mega88PA, mega88PB, mega168, mega168A, mega168P,
mega168PA, mega168PB, mega328, mega328P, mega328PB
P28
12, D.6
13, D.7
T32
10, D.6
11, D.7
mega16, mega16A, mega164A, mega164P, mega164PA, mega32, mega32A,
mega324P, mega324PA, mega644, mega644A, mega644P, mega644PA,
mega1284P, mega161, mega162, mega163, mega323
P40
3, B.2
4, B.3
T44
42, B.2
43, B.3
mega8515, mega8535
P40
3, B.2
4, B.3
T44
42, B.2
43, B.3
L44
4, B.2
5, B.3
mega165, mega165A, mega165P, mega165PA, mega325, mega325P,
mega645, mega645A, mega645P, mega169, mega169A, mega169P,
mega169PA, mega329, mega329P, mega329PA, mega649, mega649A,
mega649P
T64
4, E.2
5, E.3
mega3250, mega3250P, mega6450, mega6450A, mega6450P,
T100
4, E.2
5, E.3
Previous page Top Next page