AN2502 Freescale Semiconductor / Motorola, AN2502 Datasheet - Page 46

no-image

AN2502

Manufacturer Part Number
AN2502
Description
Using Two Channels of the HC08 TIM to Achieve a Full-Duplex Software SCI
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2502/D
txfinished:
sendingPTY:
sendingSTB:
46
TAX
PSHH
PULA
ADC
PSHA
PULH
STHX
PULA
TAP
BRA
BRCLR PEN,rSCCR,sendingPTY
BSET
BCLR
LDA
AND
LSLA
EOR
COMA
LSRA
LSRA
TPA
BRA
BSET
BCLR
SEC
TPA
BRA
BCLR
BRSET SCTE,rSCSR1,NoTxPending
LDHX
STHX
LDA
AND
Using Two Channels of the HC08 TIM to Achieve a Full-Duplex Software SCI
#BITHI
TCH1H
oc_highorlow
PTYTX,rSCSR2
STBTX,rSCSR2
rSCCR
#$01
rSCSR2
nextbittime ; Calc. next OC time
STBTX,rSCSR2
PTYTX,rSCSR2
nextbittime ; Calculate next output compare time
TPF,rSCSR1
rSCTDRH
rSCTSRH
rSCCR
#$12
Freescale Semiconductor, Inc.
For More Information On This Product,
; Branch to calc. next OC polarity
; If Pty. disabled, send stop bit
; Indicate Parity Transfer
; Calculate PTY level depending on the
; configuration of the parity: Even or
; Odd, and the temporal parity
; calculated from the data being sent
; Store Parity level
; into carry flag
; Indicate sending stop bits
; Indicate that transmission is done
; If there is a transmission pending
; this interrupt performs the same
; operation as the SCIsend subroutine
; The data to be transmitted is moved
; from the transmit data register to
; the transmit shift register
; The number of data bits depends on
; the number of bits configured and
; the parity bit configuration:
; M=0 & PEN=0 -> 8 data bits. No Parity
; M=0 & PEN=1 -> 7 data bits. Parity
; M=1 & PEN=0 -> 9 data bits. No Parity
; M=1 & PEN=1 -> 8 data bits. Parity
; Check M & PEN configuration bits
Go to: www.freescale.com
MOTOROLA

Related parts for AN2502