AN1833 Freescale Semiconductor / Motorola, AN1833 Datasheet - Page 32

no-image

AN1833

Manufacturer Part Number
AN1833
Description
A Low-Power Wireless Remote Control Transmitter and Receiver
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
shutdown
************************************************************************************
* Send_preamble - routine that sends out a character stream to the transmitter
* Character string is 55 55 55 code command
************************************************************************************
Send_preamble sta
*
*
*
*
*
*
alt_ones
32
sta
lda
sta
lda
sta
clr
CLI
STOP
bra
bclr
bset
lda
jsr
*********************************************************************
* generate 500 microsecond logic 1 “front porch”
*********************************************************************
bset
lda
jsr
*********************************************************************
* send three preamble characters of 55 hex
*********************************************************************
lda
sta
lda
sta
jsr
dec
bne
PORTB
#$3F
DDRB
#$0F
PORTB
PDRA
start
code
txd,serial_port
xmt,serial_port
#$05
DelaymS2_Body
txd,serial_port
#$50
delay_13a
#$3
length
#55
char
put_char
length
alt_ones
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
; set Port B register to all zeroes
; set Port B direction as
; bit 5 output (transmitter switch)
; bit 4 output (serial data out)
; bit 3 output (output to switch)
; bit 2 output (output to switch)
; bit 1 output (output to switch)
; bit 0 output (output to switch)
; implement direction bits on Port B
; load the lower nibble of port B
; so when a keypad button is pushed
; a port A interrupt occurs
: ensure puldowns on port a are enabled
; Allow interrupts - IRQ pin 19 is
; hardwired to logic 1 (no interrupt
; from this pin) waiting for an
; interrupt from Port A bits
; stop to conserve power - waiting
; for a keyboard interrupt
; for getting back to stop when RTI
; comes back
; stable frequency
; generation
; go to delay routine
;
; send the character in char
; ensure serial out is low
; turn on the transmitter and wait for
; load 5 millisecond constant
; ensure serial out is high
; generate a 500 micrsecond
; delay to trigger receiver
; load count for sending
; number of 'preamble' char
; load preamble character
; decrement count
; go send another if not zero
MOTOROLA
AN1833
*
*
*
*

Related parts for AN1833