AN2502 Freescale Semiconductor / Motorola, AN2502 Datasheet - Page 40

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
; Include file for the 68HC908JL3, 68HC908JK3, 68HC908JK1
rSCCR
rSCSR1
rSCSR2
rSCRDRH
rSCRDRL
rSCRSRH
rSCRSRL
rSCTDRH
rSCTDRL
rSCTSRH
rSCTSRL
;**********************************************************************
;* Program goes here after reset
;**********************************************************************
Start:
; Example of configuration:
; Call this subroutine for SCI initial configuration
; ENTER YOUR MAIN CODE HERE. This is an example of receiving 8 or
; 9 bits which is stored in the Index Registers H:X and then sending the
; same bits back
Again:
40
Include 'jk3_registers.inc'
ORG
RMB
RMB
RMB
RMB
RMB
RMB
RMB
RMB
RMB
RMB
RMB
ORG
RSP
CLRX
CLRH
CLRA
BSET
MOV
JSR
JSR
JSR
BRA
Using Two Channels of the HC08 TIM to Achieve a Full-Duplex Software SCI
RamStart
1
1
1
1
1
1
1
1
1
1
1
RomStart
0,CONFIG1
#$0C,rSCCR
RXTX_config ; Configure Channels for reception and
GetByte
PutByte
Again
Freescale Semiconductor, Inc.
For More Information On This Product,
; SCI Control Register
; SCI Status Register 1
; SCI Status Register 2
; SCI Receive Data Register High
; SCI Receive Data Register Low
; SCI Receive Shift Register High
; SCI Receive Shift Register Low
; SCI Transmit Data Register High
; SCI Transmit Data Register Low
; SCI Transmit Shift Register High
; SCI Transmit Shift Register Low
; Reset Stack Pointer
; Initialize MCU registers
; Disable Watchdog Timer
; 8 bits, No PTY, 1 SB
; Disable RX / TX byte subroutine
; transmission. Call this function
; any SCI operation.
; Wait for data reception and store
; the received data in H:X registers
; Store the H:X registers content to the
; transmission register and wait for
; the transmission to be completed
Go to: www.freescale.com
*
MOTOROLA

Related parts for AN2502