03.01.2015 Views

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

80C186EC/80C188EC Microprocessor User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DIRECT MEMORY ACCESS UNIT<br />

The transfer count (the number of transfers desired) is written to the DMA Transfer Count Register.<br />

The Transfer Count Register is 16 bits wide, limiting the total number of transfers for a<br />

channel to 65,536 (without reprogramming). The Transfer Count Register is decremented by one<br />

after each transfer (for both byte and word transfers).<br />

Register Name:<br />

Register Mnemonic:<br />

Register Function:<br />

DMA Transfer Count<br />

DxTC<br />

Contains the DMA channel’s transfer count.<br />

15 0<br />

T<br />

C<br />

1<br />

5<br />

T<br />

C<br />

1<br />

4<br />

T<br />

C<br />

1<br />

3<br />

T<br />

C<br />

1<br />

2<br />

T<br />

C<br />

1<br />

1<br />

T<br />

C<br />

1<br />

0<br />

T<br />

C<br />

9<br />

T<br />

C<br />

8<br />

T<br />

C<br />

7<br />

T<br />

C<br />

6<br />

T<br />

C<br />

5<br />

T<br />

C<br />

4<br />

T<br />

C<br />

3<br />

T<br />

C<br />

2<br />

T<br />

C<br />

1<br />

T<br />

C<br />

0<br />

A1172-0A<br />

Bit<br />

Mnemonic<br />

Bit Name<br />

Reset<br />

State<br />

Function<br />

TC15:0<br />

Transfer<br />

Count<br />

XXXXH<br />

Contains the transfer count for a DMA channel.<br />

This value is decremented by one after each<br />

transfer.<br />

Figure 10-15. Transfer Count Register<br />

The TC bit, when set, instructs the DMA channel to disarm itself (by clearing the STRT bit) when<br />

the transfer count reaches zero. If the TC bit is cleared, the channel continues to perform transfers<br />

regardless of the state of the Transfer Count Register. Unsynchronized (software-initiated) transfers<br />

always terminate when the transfer count reaches zero; the TC bit is ignored.<br />

10.2.1.7 Generating Interrupts on Terminal Count<br />

A channel can be programmed to generate an interrupt request whenever the transfer count reaches<br />

zero. Both the TC bit and the INT bit in the DMA Control Register (Figure 10-13 on page<br />

10-20) must be set to generate an interrupt request.<br />

10-25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!