AN2502 Freescale Semiconductor / Motorola, AN2502 Datasheet - Page 30

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
oc_low:
oc_high:
txinprog:
txfinished:
30
MOV
PULH
RTI
MOV
PULH
RTI
LDA
CBEQA
LDHX
TXA
ADD
TAX
PSHH
PULA
ADC
PSHA
PULH
STHX
CLC
ROR
BRA
BCLR
BRSET
BSET
MOV
LDHX
TXA
ADD
Using Two Channels of the HC08 TIM to Achieve a Full-Duplex Software SCI
#$58,TSC1 ; If carry cleared, config.
#$5C,TSC1 ; If carry set, config.
rSCTSR
#$00,txfinished
TCH1H
#BITLO
#BITHI
TCH1H
rSCTSR
oc_highorlow
TPF,rSCSR ; Indicate that No Tx is in progress
SCTE,rSCSR,NoTxPending
SCTE,rSCSR
rSCTDR,rSCTSR
TCH1H
#BITLO
Freescale Semiconductor, Inc.
For More Information On This Product,
; output compare
; as clear on output compare
; as set on output compare
; Program goes here if a transmission is
; in progress
; If SCIDatatx is cleared,
; means that all data bits were
; sent, including the stop bit
; if transmission is in progress and
; has no finished transmitting, the time
; for the next compare to send next bit
; is added to the transmission channel
; register
; Add 1 bit time for next compare
; Once the time for the next compare is
; calculated, the polarity of the next
; compare is taken from the transmission
; shift register
; Check if another byte
; is pending for transmission.
; If a byte is pending for transmission
; the transmitter empty flag is empty
; to allow other byte to be queued.
; Move data from Tx Register to
; Tx Shift Register
; One bit time is added to the
; transmission channel to send start
; bit of the next byte to be sent
; Add 1 bit time for next compare
Go to: www.freescale.com
MOTOROLA

Related parts for AN2502