![]() ZBasic System Library
22
ZBasic Microcontrollers
TimerD0
TimerE0
TimerE1
TimerF0
TimerF1
25, D.0
35, E.0
39, E.4
45, F.0
49, F.4
xmegaA3, xmegaA3BU, xmegaA3U, xmegaA3BU
T64
TimerC0
TimerD0
TimerE0
TimerF0
16, C.0*
26, D.0
36, E.0
46, F.0
xmegaA4, xmegaA4U
T44
TimerC0
TimerD0
TimerE0
10, C.0*
20, D.0
28, E.0
xmegaD3
T64
TimerC0
TimerD0
TimerE0
TimerF0
16, C.0*
26, D.0
36, E.0
46, F.0
xmegaD4
T44
TimerC0
TimerD0
TimerE0
10, C.0*
20, D.0
28, E.0
The tables below give the set of pins and corresponding timers that can be used by the OutputCaptureEx
subroutine and also indicate (with an asterisk) the default pin used by the OutputCapture subroutine.
When an output capture operation has been started successfully, the corresponding timer busy flag (e.g.
Register.Timer1Busy) will be set True for the duration of the output capture operation. Note that an
output capture cannot be used at the same time as an input capture operation involving the same timer.
When performing an output capture on a general I/O pin (i.e. a pin not listed in the tables below), any
available 16-bit timer will be used to generate the required timing. If no 16-bit timer is available at the
time, the routine will return immediately.
For native code ZX devices and all generic target devices, at least one ISR will be provided by the
compiler automatically to facilitate the output capture operation corresponding to the timer compare
interrupt. The names of the interrupt vectors are related to the timer and the compare register being
used. For example, for an ATtiny or ATmega device using Timer1 the ISR name would be
Timer1_COMPB while for an xmega device for TimerC0 the ISR name would be TIMERC0_CCB. Note
that if the compiler cannot determine at compile time which timer and compare register will be used, or if
output capture on a general I/O pin is specified, the compare B ISRs for all possible timers will be
included in the application.
Hardware Output Capture Pins for ZX Devices
ZX Device
Timer
Output
Pin
Timer
Output
Pin
ZX-24, ZX-24a, ZX-24p, ZX-24n
Timer1
27, D.4*
ZX-40, ZX-40a, ZX-40p, ZX-40n
Timer1
18, D.4*
ZX-44, ZX-44a, ZX-44p, ZX-44n
Timer1
13, D.4*
ZX-24r, ZX-24s, ZX-24t
Timer1
27, D.4*
Timer3
B.7
ZX-40r, ZX-40s, ZX-40t
Timer1
18, D.4*
Timer3
8, B.7
ZX-44r, ZX-44s, ZX-44t
Timer1
13, D.4*
Timer3
3, B.7
ZX-328n, ZX-328l
Timer1
16, B.2*
ZX-32n, ZX-32l
Timer1
14, B.2*
ZX-1281, ZX-1281n
Timer1
Timer3
16, B.6*
6, E.4
Timer1
17, B.7¹
ZX-1280, ZX-1280n
Timer1
Timer3
Timer5
25, B.6*
6, E.4
39, L.4
Timer1
Timer4
26, B.7¹
16, H.4
ZX-24x, ZX-24u
TimerC0
11, C.1
TimerD0
27, D.1*
|