SERIAL COMMUNICATION INTERFACE (SCI)
6 - 64
PORT C
MOTOROLA
;*******************************************************************************************
;
MULTIDROP MASTER/SLAVE WITH INTERRUPTS AND CIRCULAR BUFFERS
*
;*******************************************************************************************
;*************************************************
;
SCI and other EQUATES
*
;*************************************************
START
EQU
$0040
;Start of program
TX_BUFF
EQU
$0010
;Transmit buffer location
RX_BUFF
EQU
$0020
;Receive buffer location
B_SIZE
EQU
$000E
;Transmit and receive buffer size
;(don’t allow the TX buffer and RX
;buffers to overlap).
TX_MTY
EQU
$0000
;Transmit buffer empty
RX_MTY
EQU
$0001
;Receive buffer empty
PCC
EQU
$FFE1
;Port C control register
SCR
EQU
$FFF0
;SCI interface control register
SCCR
EQU
$FFF2
;SCI clock control register
STXA
EQU
$FFF3
;SCI transmit address register
SRX
EQU
$FFF4
;SCI receive register
STX
EQU
$FFF4
;SCI transmit register
BCR
EQU
$FFFE
;Bus control register
IPR
EQU
$FFFF
;Interrupt priority register
;*************************************************
;
RESET VECTOR
*
;*************************************************
ORG
P:$0000
JMP
START
;*************************************************
;
SCI RECEIVE INTERRUPT VECTOR
*
;*************************************************
ORG
P:$0014
;Load the SCI RX interrupt vectors
JSR
RX
;Jump to the receive routine that puts
;data packet in a circular buffer if it is for
;this address.
NOP
;Second word of fast interrupt not needed
Figure 6-34 Multidrop Transmit Receive Example (Sheet 1 of 4)
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..