Rev. 3.0, 10/02, page 215 of 686
8.7
Examples of Use of the DTC
8.7.1
Normal Mode
An example is shown in which the DTC is used to receive 128 bytes of data via the SCI.
1. Set MRA to fixed source address (SM1 = SM0 = 0), incrementing destination address (DM1 =
1, DM0 = 0), normal mode (MD1 = MD0 = 0), and byte size (Sz = 0). The DTS bit can have
any value. Set MRB for one data transfer by one interrupt (CHNE = 0, DISEL = 0). Set the SCI
RDR address in SAR, the start address of the RAM area where the data will be received in
DAR, and 128 (H'0080) in CRA. CRB can be set to any value.
2. Set the start address of the register information at the DTC vector address.
3. Set the corresponding bit in DTCER to 1.
4. Set the SCI to the appropriate receive mode. Set the RIE bit in SCR to 1 to enable the reception
complete (RXI) interrupt. Since the generation of a receive error during the SCI reception
operation will disable subsequent reception, the CPU should be enabled to accept receive error
interrupts.
5. Each time reception of one byte of data ends on the SCI, the RDRF flag in SSR is set to 1, an
RXI interrupt is generated, and the DTC is activated. The receive data is transferred from RDR
to RAM by the DTC. DAR is incremented and CRA is decremented. The RDRF flag is
automatically cleared to 0.
6. When CRA becomes 0 after the 128 data transfers have ended, the RDRF flag is held at 1, the
DTCE bit is cleared to 0, and an RXI interrupt request is sent to the CPU. The interrupt
handling routine should perform wrap-up processing.
8.7.2
Software Activation
An example is shown in which the DTC is used to transfer a block of 128 bytes of data by means
of software activation. The transfer source address is H'1000 and the destination address is H'2000.
The vector number is H'60, so the vector address is H'04C0.
1. Set MRA to incrementing source address (SM1 = 1, SM0 = 0), incrementing destination
address (DM1 = 1, DM0 = 0), block transfer mode (MD1 = 1, MD0 = 0), and byte size (Sz =
0). The DTS bit can have any value. Set MRB for one block transfer by one interrupt (CHNE =
0). Set the transfer source address (H'1000) in SAR, the destination address (H'2000) in DAR,
and 128 (H'8080) in CRA. Set 1 (H'0001) in CRB.
2. Set the start address of the register information at the DTC vector address (H'04C0).
3. Check that the SWDTE bit in DTVECR is 0. Check that there is currently no transfer activated
by software.
4. Write 1 to the SWDTE bit and the vector number (H'60) to DTVECR. The write data is H'E0.
Содержание H8S/2215 Series
Страница 4: ...Rev 3 0 10 02 page iv of lviii ...
Страница 6: ...Rev 3 0 10 02 page vi of lviii ...
Страница 28: ...Rev 3 0 10 02 page xxviii of lviii ...
Страница 122: ...Rev 3 0 10 02 page 64 of 686 ...
Страница 132: ...Rev 3 0 10 02 page 74 of 686 ...
Страница 156: ...Rev 3 0 10 02 page 98 of 686 ...
Страница 198: ...Rev 3 0 10 02 page 140 of 686 ...
Страница 320: ...Rev 3 0 10 02 page 262 of 686 ...
Страница 384: ...Rev 3 0 10 02 page 326 of 686 ...
Страница 474: ...Rev 3 0 10 02 page 416 of 686 ...
Страница 481: ...Rev 3 0 10 02 page 423 of 686 I O pin Control OUT IN TDI pin TDO pin Figure 14 2 Boundary Scan Register Configuration ...
Страница 608: ...Rev 3 0 10 02 page 550 of 686 ...
Страница 614: ...Rev 3 0 10 02 page 556 of 686 ...
Страница 650: ...Rev 3 0 10 02 page 592 of 686 ...
Страница 652: ...Rev 3 0 10 02 page 594 of 686 ...
Страница 680: ...Rev 3 0 10 02 page 622 of 686 ...
Страница 721: ...Rev 3 0 10 02 page 663 of 686 ø A23 to A0 to tBRQS tBACD tBZD tBACD tBZD tBRQS Figure 24 11 External Bus Release Timing ...
Страница 732: ...Rev 3 0 10 02 page 674 of 686 ...
Страница 740: ...Rev 3 0 10 02 page 682 of 686 ...