1
I
83C152 HARDWARE DESCRIPTION
DMACHANNELO
I
DMACHANNEL1
,-
m, ~,- m,
DESTINATIONAODRESS I
DESTINATIONADDRESS
m m : ,- m,
~ ,
SOURCEADDRSSS
I
SOURCEADORESS
,- m, ; ,- m,
BYTE COUNT
I
BYTECOUNT
m;
m
OMAOCONTROL
I
DMA1 CONTROL
+
t
Two new bits in PCON control
Hold/Hold Acknowkdge Iogk
270427-28
-. . . . . . . . . .
ueriods)oerbvte transferred. exeeotwhen thedestina-
kon and”sourk are both in’Exte&al Data RAM. In
that case the transfer takes two machine cycles per
byte. The term DMA Cyclewill be used to mean the
transfer of a single&ta bytej whether it takeB1 or 2
machinecycles.
Associatedwitheachchannelare sevenSFRS,shownin
Figure4.1.SARLnandSARI% holdsthe lowandhigh
bytesofthe sourceaddress.Takentogethertheyforma
id-bit SourceAddressRegister.DARLn and DARHII
hold the lowand highbyteaof the destinationaddress,
and together form the Destination Address Register.
BCRLnandBCRHnholdthe lowand highbytesofthe
number of bytes to be transferred, and togetherform
the ByteCountRegister.DCONnconteinscontroland
flagbits.
Two bits in DCONn are used to speeifythe physical
destination of the data transfer. These bits are DAS
(DestinationAddressSpace)and IDA (IncrementDes-
tination Address).If DAS = O,the destinationis in
data memoryexternal to the C152.If DAS = 1, the
destinationis intemsl to the C152.If DAS = 1 and
IDA = O,theinternaldestinationis a SpecialFunction
Register(SFR).If DAS = 1and IDA = 1,the inter-
nal destinationis in the 256-bytedata RAM.
In any case, if IDA = 1, the destination address is
automaticallyincrementedafter each byte transfer. If
IDA = O,it is not.
Twoother bits in DCONnspecifythe phyaiealsource
of the &ta to be transferred. These are SAS (Source
AddressSpace)and ISA (Increment SourceAddress).
If SAS = O,the sourceis in &ta memoryexternal to
the C152.IfSAS = 1,the aoureeis internal.If SAS=
1and ISA = O,the internal sourceis an SFR. If SAS
= 1andISA = 1,theioternsl sourceis in the 256-byte
data RAM.
In anycase,ifLSA= 1,the sourceaddressis automati-
callyincrementedafter eachbytetransfer. If ISA = O,
it is not.
Thefunctionsofthesefourccmtrolbits are summarized
below:
DAS IDA
Destination Auto-lncrament
o 0
ExternalRAM no
o 1
ExternalRAM yes
1
0 SFR no
1
1
InternalRAM
yes
SAS ISA Source Auto-Increment
o
0 ExternalRAM no
o 1
ExternalRAM yes
1 0
SFR no
1
1 InternalRAM
yes
7-48