Rabbit 6000 User’s Manual
digi.com
46
4.3 Operation
4.3.1 Periodic Interrupt
The following steps explain how a periodic interrupt is used.
1. Write the vector to the interrupt service routine to the internal interrupt table.
2. Enable the periodic interrupt by writing to GCSR.
3. The interrupt request is cleared by reading from GCSR.
A sample interrupt handler is shown below.
periodic_isr::
push af
ioi ld a, (GCSR) ; clear the interrupt request and get status
; handle any periodic tasks here
pop af
ipres
ret
4.3.2 Real-Time Clock
The real-time clock consists of six 8-bit registers that together comprise a 48-bit value. The real-time clock
is not synchronized to the read operation, so the least-significant byte should be read twice and checked for
matching values; if the two reads do not match, then the real-time clock may have been updating during
the read and should be read again.
Writing to RTC0R latches the current real-time clock value into the RTCxR holding registers, so the fol-
lowing sequence should be used to read the real-time clock.
1. Write any value to RTC0R and then read back a value from RTC0R.
2. Write a value to RTC0R again, and again read back a value from RTC0R.
3. If the two values do not match, repeat Step 2 until the last two readings are identical.
4. At this point, registers RTC1R through RTC6R can also be read and used.
Note that the periodic interrupt and the real-time clock are clocked by the same edge of the 32 kHz clock;
if read from the periodic interrupt, the count is guaranteed to be stable and only needs to be read once
(assuming it occurs within one clock of the 32 kHz clock).
The real-time clock can be reset by writing the sequence 0x40 – 0x80 to RTCCR. It can be reset and left in
the byte increment mode by writing 0x40 – 0xC0 to RTCCR and then writing bytes repeatedly to RTCCR
to increment the appropriate bytes of the real-time clock. The byte increment mode is disabled by writing
0x00 to RTCCR.
Summary of Contents for 6000
Page 1: ...Rabbit 6000 Microprocessor User s Manual 90001108_J...
Page 11: ...Rabbit 6000 User s Manual digi com 11 1 3 Block Diagram Figure 1 1 Rabbit 6000 Block Diagram...
Page 43: ...Rabbit 6000 User s Manual digi com 43 4 1 1 Block Diagram...
Page 57: ...Rabbit 6000 User s Manual digi com 57 5 1 1 Block Diagram...
Page 88: ...Rabbit 6000 User s Manual digi com 88 7 2 Block Diagram...
Page 115: ...Rabbit 6000 User s Manual digi com 115 11 1 1 Block Diagram...
Page 127: ...Rabbit 6000 User s Manual digi com 127 12 1 1 Block Diagram...
Page 138: ...Rabbit 6000 User s Manual digi com 138 13 1 1 Block Diagram...
Page 154: ...Rabbit 6000 User s Manual digi com 154 15 1 1 Block Diagram...
Page 163: ...Rabbit 6000 User s Manual digi com 163 16 1 1 Block Diagram...
Page 170: ...Rabbit 6000 User s Manual digi com 170 17 1 1 Block Diagram...
Page 177: ...Rabbit 6000 User s Manual digi com 177 18 1 1 Block Diagram...
Page 186: ...Rabbit 6000 User s Manual digi com 186 19 1 1 Block Diagram...
Page 230: ...Rabbit 6000 User s Manual digi com 230 22 2 Block Diagram...
Page 234: ...Rabbit 6000 User s Manual digi com 234 Figure 22 3 Sample Slow A D Converter Circuit...
Page 287: ...Rabbit 6000 User s Manual digi com 287 25 1 1 Block Diagram...
Page 310: ...Rabbit 6000 User s Manual digi com 310 26 1 1 Block Diagram...
Page 323: ...Rabbit 6000 User s Manual digi com 323 28 1 1 Block Diagram...
Page 351: ...Rabbit 6000 User s Manual digi com 351 31 1 4 Block Diagram...
Page 361: ...Rabbit 6000 User s Manual digi com 361 32 1 1 Block Diagram...
Page 369: ...Rabbit 6000 User s Manual digi com 369 33 2 Block Diagram...
Page 390: ...Rabbit 6000 User s Manual digi com 390 35 1 1 Block Diagram...
Page 408: ...Rabbit 6000 User s Manual digi com 408...
Page 410: ...Rabbit 6000 User s Manual digi com 410...
Page 411: ...Rabbit 6000 User s Manual digi com 411...
Page 420: ...Rabbit 6000 User s Manual digi com 420 Figure 37 1 Memory Read and Write Cycles...