Page 45 of 346 Start Back Next End ZBasic System Library 33 ZBasic Microcontrollers 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 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 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 tiny87, tiny167 P20 9, A.6 10, A.7 Q20 11, A.6 12, A.7 tiny2313, tiny2313A, tiny4313 P20 12, B.0 13, B.1 Q20 10, B.0 11, B.1 mega48, mega48A, mega48P, mega48PA, mega8, mega8A, mega88, mega88A, mega88P, mega88PA, mega168, mega168A, mega168P, mega168PA, mega328, mega328P 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, mega3290, mega3290P, mega6490, mega6490A, mega6490P T100 4, E.2 5, E.3 mega1281, mega2561, mega64, mega64A, mega128, mega128A, AT90CAN32, AT90CAN64, AT90CAN128 T64 4, E.2 5, E.3 mega640, mega1280, mega2560 T100 4, E.2 5, E.3 mega8U2, mega16U2, mega32U2, AT90USB82, AT90USB162 T32 7, D.1 8, D.2 AT90USB646, AT90USB647, AT90USB1286, AT90USB1287 T64 1, E.6 2, E.7 mega16U4, mega32U4 T44 1, E.6 -