SERIAL COMMUNICATION INTERFACE (SCI)
MOTOROLA
PORT C
6 - 65
ORG
P:$0016
;This interrupt occurs when data is
;received with errors. This example
NOP
;does not trap errors so this
NOP
;interrupt is not used.
;*************************************************
;
SCI TRANSMIT INTERRUPT VECTOR
*
;*************************************************
ORG
P:$0018
;Load the SCI TX interrupt vectors
JSR
TX
;Transmit next byte in buffer
NOP
;*************************************************
;
INITIALIZE THE SCI PORT
*
;*************************************************
ORG
P:START
;Start the program at location $40
ORI
#$03,MR
;Mask interrupts temporarily
MOVEP
#$C000,X:IPR
;Set interrupt priority to 2
MOVEP
#$0BE6,X:SCR
;Disable TX, enable RX interrupts
;Enable transmitter and receiver,
;Wired-OR mode, Rec. wakeup
;mode,11-bit multidrop (1 start,
;8 data,1 data type, 1 stop)
MOVEP
#$0000,X:SCCR
;Use internal TX, RX clocks
;625K BPS at 40 MHz
MOVEP
#>$03,X:PCC
;Select pins TXD and RXD for SCI
;**************************************************
;INITIALIZE INTERRUPTS, REGISTERS, ETC.
*
;**************************************************
MOVEP
#$0,X:BCR
;No wait states
MOVE
#TX_BUFF,R0
;Load start pointer of transmit buffer
MOVE
#TX_BUFF,R1
;Load end pointer of transmit buffer
MOVE
#RX_BUFF,R2
;Load start pointer of receive buffer
MOVE
#RX_BUFF,R3
;Load end pointer of receive buffer
MOVE
#>$41,R5
;Init data register... R5 contains
;the data that will be sent in this
;example; it is initialized to an ASCII A.
Figure 6-34 Multidrop Transmit Receive Example (Sheet 2 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
.
..