![background image](http://html2.mh-extra.com/html/rabbit/6000/6000_user-manual_3115352326.webp)
Rabbit 6000 User’s Manual
digi.com
326
28.3 Operation
28.3.1 Input-Capture Channel
The following steps explain how to set up an input-capture channel.
1. Configure Timer A8 via TAT8R (and optionally TAT12R) to provide the desired input-capture
clock.
2. Configure ICTxR to provide the desired start/stop operation and conditions.
3. Configure ICSxR to select the input pins for the start and stop conditions.
4. Configure ICCR to select either the count or the capture mode.
5. Reset the counter by writing to ICCSR.
28.3.2 Handling Interrupts
The following steps explain how an interrupt is used.
1. Write the vector to the interrupt service routine to the internal interrupt table
2. Configure the Input Capture Control/Status Register (ICCSR) to select events that will generate an
interrupt.
3. Configure the Input Capture Control Register (ICCR) to select the interrupt priority (note that inter-
rupts will be enabled once this value is set; this step should be done last).
The following actions occur within the interrupt service routine.
•
If needed, the current counter value can be read from ICLxR and ICMxR (reading from ICLxR latches
the value of ICMxR, so ICLxR should always be read first)
•
If the counter is expected to roll over, determine if that is why the interrupt occurred by reading the sta-
tus bits in ICCSR and adjusting any software counters accordingly
•
The interrupt request should be cleared by reading from ICCSR
28.3.3 Example ISR
A sample interrupt handler is shown below.
ic_isr::
push af
ioi ld a, (ICCSR) ; clear the interrupt request and get status
; determine which interrupts have occurred
; if rollover, perform any necessary software counter adjustments
here
; read counter values
pop af
ipres
ret
Содержание 6000
Страница 1: ...Rabbit 6000 Microprocessor User s Manual 90001108_J...
Страница 11: ...Rabbit 6000 User s Manual digi com 11 1 3 Block Diagram Figure 1 1 Rabbit 6000 Block Diagram...
Страница 43: ...Rabbit 6000 User s Manual digi com 43 4 1 1 Block Diagram...
Страница 57: ...Rabbit 6000 User s Manual digi com 57 5 1 1 Block Diagram...
Страница 88: ...Rabbit 6000 User s Manual digi com 88 7 2 Block Diagram...
Страница 115: ...Rabbit 6000 User s Manual digi com 115 11 1 1 Block Diagram...
Страница 127: ...Rabbit 6000 User s Manual digi com 127 12 1 1 Block Diagram...
Страница 138: ...Rabbit 6000 User s Manual digi com 138 13 1 1 Block Diagram...
Страница 154: ...Rabbit 6000 User s Manual digi com 154 15 1 1 Block Diagram...
Страница 163: ...Rabbit 6000 User s Manual digi com 163 16 1 1 Block Diagram...
Страница 170: ...Rabbit 6000 User s Manual digi com 170 17 1 1 Block Diagram...
Страница 177: ...Rabbit 6000 User s Manual digi com 177 18 1 1 Block Diagram...
Страница 186: ...Rabbit 6000 User s Manual digi com 186 19 1 1 Block Diagram...
Страница 230: ...Rabbit 6000 User s Manual digi com 230 22 2 Block Diagram...
Страница 234: ...Rabbit 6000 User s Manual digi com 234 Figure 22 3 Sample Slow A D Converter Circuit...
Страница 287: ...Rabbit 6000 User s Manual digi com 287 25 1 1 Block Diagram...
Страница 310: ...Rabbit 6000 User s Manual digi com 310 26 1 1 Block Diagram...
Страница 323: ...Rabbit 6000 User s Manual digi com 323 28 1 1 Block Diagram...
Страница 351: ...Rabbit 6000 User s Manual digi com 351 31 1 4 Block Diagram...
Страница 361: ...Rabbit 6000 User s Manual digi com 361 32 1 1 Block Diagram...
Страница 369: ...Rabbit 6000 User s Manual digi com 369 33 2 Block Diagram...
Страница 390: ...Rabbit 6000 User s Manual digi com 390 35 1 1 Block Diagram...
Страница 408: ...Rabbit 6000 User s Manual digi com 408...
Страница 410: ...Rabbit 6000 User s Manual digi com 410...
Страница 411: ...Rabbit 6000 User s Manual digi com 411...
Страница 420: ...Rabbit 6000 User s Manual digi com 420 Figure 37 1 Memory Read and Write Cycles...