Motorola MC68340 User Manual page 343

Integrated processor with dma
Hide thumbs Also See for MC68340:
Table of Contents

Advertisement

* Serial register offsets from serial base address
MR1A
EQU
$10
MR2A
EQU
$20
SRA
EQU
$11
CSRA
EQU
$11
CRA
EQU
$12
ACR
EQU
$14
OPCR
EQU
$1D
OP_BS
EQU
$1E
OP_BR
EQU
$1F
***************************************************************************
***************************************************************************
* Initialize Serial channel A
***************************************************************************
LEA
MODBASE+SERIAL,A0
* Module configuration register:
* Enable serial module for normal operation, ignore FREEZE, select the
* crystal clock. Supervisor/user serial registers unrestricted.
* Interrupt arbitration at priority $02.
MOVE.B
#$00,MCRH(A0)
MOVE.B
#$02,MCRL(A0)
* WAIT FOR TRANSMITTER EMPTY (OR TIMEOUT)
MOVE.W
#$2000,D0
XBMTWAIT EQU
*
BTST
#3,SRA(A0)
NOP
DBNE
D0,XBMTWAIT
* NEGATE RTSA SIGNAL OUTPUT
MOVE.B
#0,OPCR(A0)
MOVE.B
#$01,OP_BR(A0)
* RESET RECEIVER/TRANSMITTER
MOVE.B
#$20,CRA(A0)
MOVE.B
#$30,CRA(A0)
* SET BAUD RATE SET 2
MOVE.B
#$80,ACR(A0)
* MODE REGISTER 1
MOVE.B
#$93,MR1A(A0)
7-48
Freescale Semiconductor, Inc.
Mode register 1 A
Mode register 2 A
Status register A
Clock select reg A
Command reg A
Auxiliary control reg
Output port control reg
Output port bit set (write 1 to set)
Output port bit reset (write 1 to clear)
Pointer to serial channel A
MC68340 USER'S MANUAL
For More Information On This Product,
Go to: www.freescale.com
init loop counter
TX empty in status reg?
loop until set or timeout
make OP0-7 general purpose
clear RTSA /OP0 output
Issue reset receiver command
Issue reset transmitter command
8 bits, no parity, auto RTS control
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents