AN2295 Freescale Semiconductor / Motorola, AN2295 Datasheet - Page 34

no-image

AN2295

Manufacturer Part Number
AN2295
Description
Developers Serial Bootloader for M68HC08 and HCS08 MCUs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
MCU Slave Software
;*******************************************************************************************
SCIRX:
SCIRXNOEDGE:
SCIRX1:
SCIRX2: BRCLR
RXDLOW: LDHX
Macros
Several macros are defined across the two codelistings. They improve the readability or memory
consumption. They are provided in
34
BRRXDLO SCIRX
PSHH
PSHX
BCLR
LDX
LDA
LSRX
RORA
STX
STA
BSET
BRRXDHI SCIRX1
BCLR
MOV
LSRA
BRRXDLO RXDLOW
ORA
STHX
BCLR
DBNZ
BRA
7,TSC
ONEBIT
ONEBIT+1
TMODH
TMODL
4,TSC
5,TSC
#9,BITS
7,TSC,SCIRX2
#$80
ONEBIT
TMOD
7,TSC
BITS,SCIRX2
EPILOG
Figure 23. Software-SCI Receive Char Routine Source Code
Developer’s Serial Bootloader for M68HC08 and HCS08 MCUs, Rev. 6
Figure
; loop until RXD high (idle)
; and clear TOF
; clear timer
; loop until RXD low (wait for start bit)
; run timer
; number of bits + 1
; wait for TOF
; shift data right (highest bit cleared)
; skip if RXD low
; set highest bit if RXD high
; and clear TOF
; and loop for next bit
24.
Freescale Semiconductor

Related parts for AN2295