![background image](http://html2.mh-extra.com/html/rabbit/6000/6000_user-manual_3115352190.webp)
Rabbit 6000 User’s Manual
digi.com
190
19.3 Operation
TIP:
Remember to set up the serial port registers before commanding the serial port to send or
receive any data.
19.3.1 Asynchronous Mode
The following steps explain how to set up Serial Ports A – D for asynchronous operation. These instruc-
tions also apply to the asynchronous operation of Serial Ports E – F.
1. Write the interrupt vector for the interrupt service routine to the internal interrupt table.
2. Set up the desired transmit pin by writing to the appropriate parallel port function register (PxFR) and
alternate output register (PxALR or PxAHR).
3. Select the appropriate mode by writing to SxCR (receive input port and 7 or 8 bits). Also select the
interrupt priority.
4. Select additional options by writing to SxER (parity, RZI encoding, clock polarity, and behavior
during break).
5. Write the desired divider value to TATxR for the appropriate serial port, or else write a divider value
to the dedicated 15-bit divider in SxDLR and SxDHR. If the dedicated divider is to be used, write a
1 to the most-significant bit of SxDHR to enable it.
A sample asynchronous serial interrupt handler is shown below for Serial Port A.
async_sera_isr::
push af ; save used registers
ioi ld a, (SASR) ; get status
bit a,7 ; check if byte ready in RX buffer
push af ; save status for next check
jr z, check_for_tx
rx_ready:
ioi ld a, (SADR) ; read byte and clear interrupt
; do something with byte here
check_for_tx:
pop af
bit a,3 ; check if TX buffer was emptied
jr nz, done
; get next byte to be transmitted into A here
ioi ld (SADR), a ; load next byte into TX buffer and clear
; interrupt
done:
pop af ; restore used registers
ipres
ret
To transmit with a “1” address bit appended, write the data to SxAR instead of SxDR; to append a “0”
address bit write to SxLR instead.
Содержание 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...