English
Language : 

MC68302 Datasheet, PDF (364/480 Pages) Motorola, Inc – Integrated Multiprotocol Processor User’s Manual
MC68302 Applications
Set RXBD
MOVE.B
SUBQ.B
MOVE.W
MOVE.W
MOVE.L
ADDQ.L
ADDA.L
DBRA
#BD_CNT,D3
#2,D3
D1,ST_BD(A0)
#0,LN_BD(A0)
A1,PT BD(A0)
#SZ_BD,A0
#SZ_BF,A1
D3,SetRXBD
;# of BD used = 8
;Set Control and Status Bits
;Length = 0
;Set buffer pointer
;Next BD
;Next BF
* Set the last BD
MOVE.W
MOVE.W
MOVE.L
D2,ST_BD(A0)
#0,LN_BD(A0)
A1,PT_BD(A0)
;Wrap = 1
;Length = 0
;Buffer Pointer
*SCC1 Tx Buffer Descriptors Initialization values before execution
*00700440 5C00 0000 0003 0080 5C00 0000 0003 0090
*00700450 5C00 0000 0003 00A0 5C00 0000 0003 00B0
*00700460 5C00 0000 0003 00C0 5C00 0000 0003 00D0
*00700470 5C00 0000 0003 00E0 7C00 0000 0003 00F0
*
*
SetTXBD
LEA.L
LEA.L
MOVE.W
MOVE.W
MOVE.L
SUBQ.B
MOVE.W
MOVE.W
MOVE.L
ADDQ.L
ADDA.L
DBRA
TXBD_01,A0
TXBF_01,A1
#$5C00, D1
#$7C00,D2
#BD_CNT,D3
#$2,D3
D1,ST_BD(A0)
#0,LN_BD(A0)
A1,PT_BD(A0)
#SZ_BD,A0
#SZ_BF,A1
D3,SetTXBD
;A0 points to the first TXBD of SCC1
;A1 points to the first buffer
;D1 is used for setting the status of BD
;Ready = 0, External = 1, Interrupt = 1,
;Last = 1, TxCRC = 1
;D2 is for the last BD, Wrap = 1
;# of BD used = 8
;Count from 6 to 0
;Set Control and Status Bits
;Length = 0
;Set buffer pointer
;Next BD
;Next BF
*Set the last BD
MOVE.W
MOVE.W
MOVE.L
D2,ST_BD(A0)
#0,LN_BD(A0)
A1,PT_BD(A0)
;Wrap = 1
;Length = 0
;Buffer Pointer
***Prepare Tx Buffers: In this example each frame fits into one buffer ***
*00030080 0001 0203 0405 0607 0809 0A0B 0C0D 0E0F
*00030090 0001 0203 0405 0607 0809 0A0B 0C0D 0E0F
*...
*000300F0 0001 0203 0405 0607 0809 0A0B 0C0D 0E0F
LEA.L
TXBF_01,A0
;A1 points to the first buffer
MOVE.L #SZ_BD,D1
;D1 is used to count the BD
SUBO.B #1,D1
NxtBF
CLR.L
D2
;D2 is used as content and counter of BF
NxtBT
MOVE.B D2,(A0)+
ADDQ.B #$1,D2
CMPI.B #SZ_BF,D2
;Number of data in a buffer is 16
D-14
MC68302 USER’S MANUAL
MOTOROLA