AN1833 Freescale Semiconductor / Motorola, AN1833 Datasheet - Page 42

no-image

AN1833

Manufacturer Part Number
AN1833
Description
A Low-Power Wireless Remote Control Transmitter and Receiver
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
get_data_bits bsr
get_stop_bit
yes_noise
no_noise
************************************************************************************
* Routine from AN1240 written by Scott George
* get_bit - receive one bit of filtered data and noise info;
*
*
* input cond.
* output cond.
* stack used
* variables used
* ROM used
************************************************************************************
get_bit
samp_1 adc
samp_2 adc
samp_3
42
called by get_char and frontporch
rora
rorx
rora
ror
lda
bsr
tsta
dec
bne
bsr
lsra
sta
bcc
txa
beq
lda
add
lda
lsra
rts
clra
brset
#0
brset
#0
brset
adc
rts
eor
coma
get_bit
char
#2*(BAUD_SEL-3)
delay_13a
count
get_data_bits
get_bit
count
yes_noise
char
no_noise
#$08
#$08
count
- RXD pin defined as an input pin
- ACC = 000000dn, where d = filtered data, n = noise info
- 0 bytes
- none
- 17 bytes
rxd,serial_port,samp_1;[5] sample 1st bit into carry
rxd,serial_port,samp_2 ;[5] sample 2nd bit into carry
rxd,serial_port,samp_3 ;[5] sample 3rd bit into carry
#0
Freescale Semiconductor, Inc.
For More Information On This Product,
;[3] add it to acc
;[3] add it to acc
Go to: www.freescale.com
;[39] sample data bit
;[3] noise bit -> carry
;[3] carry -> noise data reg
;[3] filtered data bit -> carry
;[5] carry -> char
;[2] prepare for 1 bit delay
;[13a+12] execute delay routine
;[3] for timing purposes only
;[5] bit received, dec count
;[3] loop if more bits to get
;[39] sample stop bit
;[3] noise bit -> carry
;
;[4] store stop bit in count
;[3] if noise, then branch
;[2] noise data -> acc
;[3] XOR noise with char,
;[3] and if result=0,
;
;
;[2] set noise bit (half carry)
;[2] by adding $8 to $8
;[3] retrieve stop data bit,
;[3] complement it,
;[3] and shift it into carry
;
;[6] exit (get_char)
;[3] add it to acc
;[6] exit (get_bit)
;[3] used to add sampled bits
acc=filtered stop bit
then no noise in data
reception
for frame error bit
MOTOROLA
AN1833
*
*
*
*
*
*
*
*
*

Related parts for AN1833