![]() ZBasic System Library
34
ZBasic Microcontrollers
The table below shows the register containing the Analog Comparator Multiplexer Enable (ACME) bit.
Where available, this bit can be used to allow the output of the analog input multiplexer to feed the
negative input of the analog comparator. For target devices having n/a in the second column, this
capaability is not present.
Register Containing the ACME Bit by Target Device
Target Device
ACME bit
Register
tiny24, tiny24A, tiny44, tiny44A, tiny84, tiny48, tiny88, tiny87, tiny167
ADCSRB
tiny2313, tiny2313A, tiny4313
n/a
mega8, mega8A, mega16, mega16A, mega32, mega32A, mega163, mega323, mega8535
SFIOR
mega48, mega48A, mega48P, mega48PA, mega88, mega88A, mega88P, mega88PA,
mega168, mega168A, mega168P, mega168PA, mega328, mega328P
ADCSRB
mega8515, mega161, mega162
n/a
mega164A, mega164P, mega164PA, mega324P, mega324PA, mega644, mega644A,
mega644P, mega644PA, mega1284P
ADCSRB
mega165, mega165A, mega165P, mega165PA, mega325, mega325P, mega645,
mega645A, mega645P, mega169, mega169A, mega169P, mega169PA, mega329,
mega329P, mega329PA, mega649, mega649A, mega649P
ADCSRB
mega3250, mega3250P, mega6450, mega6450A, mega6450P,
mega3290, mega3290P, mega6490, mega6490A, mega6490P
ADCSRB
mega64, mega64A, mega128, mega128A, AT90CAN32, AT90CAN64, AT90CAN128
SFIOR
mega1281, mega2561, mega640, mega1280, mega2560, mega16U4, mega32U4
ADCSRB
mega8U2, mega16U2, mega32U2, AT90USB82, AT90USB162
n/a
AT90USB646, AT90USB647, AT90USB1286, AT90USB1287
ADCSRB
The table below shows the analog comparator input pins for ATxmega targets and ZX devices based on
xmega chips.
ATxmega Analog Comparator Interrupt Support
Processors
WaitForInterrupt
intNum
Interrupt
Trigger
Interrupt
xmegaA1, xmegaA3, xmegaA3B, xmegaA4,
xmegaD3, xmegaD4
waitAnalogCompA0
waitAnalogCompA1
waitAnalogCompAW
AC A, Channel 0
AC A, Channel 1
AC A, Window
ACA_AC0
ACA_AC1
ACA_ACW
xmegaA1, xmegaA3, xmegaA3B
waitAnalogCompB0
waitAnalogCompB1
waitAnalogCompBW
AC B, Channel 0
AC B, Channel 1
AC B, Window
ACB_AC0
ACB_AC1
ACB_ACW
For the native code devices (e.g. ZX-24n), a few interrupt service routines (ISRs) are typically included in
your program (e.g. for Com1 and the RTC if not specifically disabled) while others are included only if
certain System Library routines are used in your program. In some cases, the additional ISRs that are
included when a specific System Library routine is used depends on how the routine is invoked and what
the compiler can deduce regarding which ISRs might be needed. For example, if OpenCom() is invoked
one or more times but the compiler can determine that the Com1 is always the channel being used, no
additional ISRs are included since the Com1 ISRs are usually included anyway. On the other hand, if the
compiler cannot determine which channel is being opened in one or more cases, it includes the ISRs for
all Com channels, both hardware-based and software-based channels.
In the description of each System Library routine, information is given about the set of ISRs might be
included in your program if you use that routine. This information is only important, of course, if you are
also providing one or more ISRs in your code because conflicts may arise. (See the section entitled
Defining Interrupt Service Routines in the ZBasic Language Reference Manual for more information on
how this is done.) The table below gives an overview of which System Library routines may cause ISRs
to be included atomatically in your program.
|