AN1833 Freescale Semiconductor / Motorola, AN1833 Datasheet - Page 39

no-image

AN1833

Manufacturer Part Number
AN1833
Description
A Low-Power Wireless Remote Control Transmitter and Receiver
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
************************************************************************************
* get_data - the routine that acquires data and puts it into the receive buffer.
* A timer interrupt is the expected exit path.
************************************************************************************
get_data
main_loop
waiting_for_int beq
*
*
*
********************************************
**
***
**** Entry point for timer interrupt routine
***
**
********************************************
Timer_SVR
RTI_int
check_msg_forma lda
look
next
AN1833
MOTOROLA
****************************************************************
****************************************************************
* waiting for timer interrupt- expected exit point - see RTI_int *
lda
STA
cli
lda
sta
jsr
lda
ldx
sta
lda
cmp
inc
bra
equ
equ
sei
lda
sta
sta
sta
ldx
lda
sta
lda
cmp
beq
incx
inc
lda
cmp
beq
bra
length
#$1C
TSCR
#$0
length
get_char
char
length
buffer,x
#$3
length
main_loop
*
*
#$0C
TSCR
#$0
length
flag
length
#$55
char
buffer,x
char
got_one
length
#$3
length
done
look
Freescale Semiconductor, Inc.
waiting_for_int
For More Information On This Product,
Go to: www.freescale.com
; initialize timer register
; and allow interrupts
; clear I bit in CCR
; initialize the index
; store in memory
; receive one byte of data from rxd pin
; get the current character
; load buffer index
; store character in recv buffer
; check for buffer full
; is count 3? (buffer full)
; wait here for interrupt if receive
; buffer is full
; increment buffer pointer
; go get another byte
;
; Real Time Interrupt routine
; disable interruptss
; clear timer overflow flag
; clear RTI flag
; Timer overflow disable
; Real Time Interrupt disable
;
; initialize the index
; in location length
; clear all flags
; and load the index register
; looking for a 55
; get a buffer character
; check if it's a 55
; branch if a 55
; looked for all possible 55s?
; in the first three buffer
; locations
; branch if so
; go back and look some more
***
***
timer interval is 8.2 msec
****
**
**
Application Note
Code Listing
39
*
*

Related parts for AN1833