![Digi Rabbit 5000 Скачать руководство пользователя страница 192](http://html1.mh-extra.com/html/digi/rabbit-5000/rabbit-5000_user-manual_2496192192.webp)
192
Rabbit 5000 Microprocessor User’s Manual
18.3 Operation
TIP:
Remember to set up the serial port bits before commanding the serial port to send or
receive any data.
18.3.1 Asynchronous Mode
The steps to set up Serial Ports E – F for asynchronous operation are identical to those
described in Section 17.3.1 to set up Serial Ports A – D.
18.3.2 HDLC Mode
The following steps explain how to set up Serial Ports E – F for the HDLC mode.
1. Write the interrupt vector for the interrupt service routine to the internal interrupt table.
2. Set up the desired data transmit and clock pins 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 clock source).
Also select the interrupt priority.
4. Select additional options by writing to SxER (data encoding, idle line condition, under-
run behavior, and combined or separate clocks).
5. Write the desired divider value to TATxR for the appropriate serial port, or else write a
divider 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. In either case,
the overall clock divider will be the value in the appropriate register plus one.
6. To start transmission of a packet, write the first byte to SxDR. If internal clock is
selected, the transmission will begin immediately; if an external clock is selected the
transmission will begin when the clock is detected.
7. Continue writing bytes when space is available in the transmit buffer until the final byte
of the packet. If a CRC is to be appended to the packet, write the final byte to SxAR. If
no CRC is required, write the final byte to SxLR and just a closing flag will be appended.
If it is desirable to abort the current packet, write 11 to bits 6–7 of SxCR, and an abort
pattern will be transmitted.
8. The receiver will be synchronized on flag bytes and will reset the CRC. By monitoring
the received bytes, decisions can be made about the incoming packet; if it is not desired
(i.e., it is not addressed to this device), writing a 01 to bits 6–7 of SxCR will force the
receiver back into the flag search mode.
Содержание Rabbit 5000
Страница 1: ...Rabbit 5000 Microprocessor User s Manual 019 0168_E...
Страница 11: ...Table of Contents Appendix B Rabbit 5000 Errata 401 B 1 Errata 401 Index 405...
Страница 12: ...Rabbit 5000 Microprocessor User s Manual...
Страница 20: ...20 Rabbit 5000 Microprocessor User s Manual...
Страница 36: ...36 Rabbit 5000 Microprocessor User s Manual...
Страница 56: ...56 Rabbit 5000 Microprocessor User s Manual...
Страница 92: ...92 Rabbit 5000 Microprocessor User s Manual...
Страница 104: ...104 Rabbit 5000 Microprocessor User s Manual...
Страница 122: ...122 Rabbit 4000 Microprocessor User s Manual...
Страница 142: ...142 Rabbit 5000 Microprocessor User s Manual...
Страница 214: ...214 Rabbit 5000 Microprocessor User s Manual...
Страница 228: ...228 Rabbit 5000 Microprocessor User s Manual...
Страница 280: ...280 Rabbit 5000 Microprocessor User s Manual...
Страница 298: ...298 Rabbit 5000 Microprocessor User s Manual...
Страница 306: ...306 Rabbit 5000 Microprocessor User s Manual...
Страница 314: ...314 Rabbit 5000 Microprocessor User s Manual...
Страница 368: ...368 Rabbit 5000 Microprocessor User s Manual...
Страница 388: ...388 Rabbit 5000 Microprocessor User s Manual...
Страница 396: ...396 Rabbit 5000 Microprocessor User s Manual...
Страница 404: ...404 Rabbit 5000 Microprocessor User s Manual...