20-668-0024 Rabbit Semiconductor, 20-668-0024 Datasheet - Page 245

IC CPU RABBIT4000 128-LQFP

20-668-0024

Manufacturer Part Number
20-668-0024
Description
IC CPU RABBIT4000 128-LQFP
Manufacturer
Rabbit Semiconductor
Datasheet

Specifications of 20-668-0024

Processor Type
Rabbit 4000 8-bit
Speed
60MHz
Voltage
2.5V, 2.7V, 3V, 3.3V
Mounting Type
Surface Mount
Package / Case
128-LQFP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Features
-
Other names
20-668-0022
316-1078

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
20-668-0024
Manufacturer:
Rabbit Semiconductor
Quantity:
10 000
22.3 Operation
The following steps explain how to set up a Quadrature Decoder channel.
1. Configure Timer A10 via TAT10R to provide the desired Quadrature Decoder clock
2. Configure QDCR to select the input pins for the two channels.
3. Reset the counters by writing to QDCSR.
22.3.1 Handling Interrupts
The following steps explain how an interrupt is set up and used.
1. Write the vector to the interrupt service routine to the internal interrupt table.
2. Configure QDCR to select the interrupt priority (note that interrupts will be enabled
The following actions occur within the interrupt service routine.
• Since a Quadrature Decoder interrupt occurs when the counter rolls over, determine
• The current counter value can be read from QDCxR (and QDCxHR if the 10-bit
22.3.2 Example ISR
A sample interrupt handler is shown below.
Chapter 22 Quadrature Decoder
speed.
once this value is set).
exactly why the interrupt occurred by reading the status bits in QDCSR and adjust any
software counters accordingly. This will also clear the interrupt request.
counter is enabled).
qd_isr::
push af
ioi ld a, (QDCSR)
; perform any necessary software counter adjustments here
; read current counter value(s)
pop af
ipres
ret
; save used registers
; clear the interrupt request and get status
; restore used registers
235

Related parts for 20-668-0024