The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

AN1833 Freescale Semiconductor, Inc. Low-Power Wireless Remo


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



Order this document AN1833/D
AN1833
Freescale Semiconductor, Inc.
Low-Power Wireless Remote Control Transmitter Receiver
William Dawson Semiconductor Products Sector, Woburn, Harry Swanson Semiconductor Products Sector, Tempe,
Introduction
low-cost solution (on-off keying) transmitter receiver periodic operation part band from described this application note. receiver designed track lock carrier (surface acoustical wave) resonator crystal-controlled transmitter. simplest form (amplitude shift keying) which carrier simply switched (pulse code modulation) waveform. Generally, low-cost transmitter consists resonator transistor used Colpitts oscillator. Frequency stability only fair, compared crystal-controlled source, offering excellent frequency stability. Because poor frequency stability time temperature effects, frequency 300-MHz resonator oscillator typically shifts ±150 kHz. standard receiver designed with wideband response capture drifted transmitter expense sensitivity selectivity.
Motorola, Inc., 2000
AN1833
More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
receiver transmitter presented this application note offer greater range operation more robust data recovery improved receiver sensitivity receiver's ability tune automatically received carrier from low-power crystalcontrolled transmitter. transmitter high-frequency stability low-harmonics power from unintentional radiators.
NOTE:
Throughout this document, numbers appearing square brackets ([1], [2], etc.) refer information References.
Freescale Semiconductor, Inc.
Application Overview
United States, Federal Communications Commission (FCC) allocated 260- 470-MHz band periodic part operation. regulations found Code Federal Regulations (CFR), title part (paragraph 15.231).
NOTE:
strongly recommended that this document reviewed before pursuing application this band. United States, most consumer applications regulated under part which covers non-licensed intentional radiators. title found most libraries reference section obtained from U.S. Government Printing Office Federal Communications Commission's site. Periodic operation refers amount time system active. manually operated transmitter will employ switch that will deactivate transmitter automatically within five seconds. Likewise, transmitter that activated automatically will cease transmission within five seconds after activation. Periodic transmissions regular intervals allowed. However, polling determine integrity transmitters used security safety applications allowed periodic rate transmission does exceed transmission more than second duration hour each transmitter system. field strength emissions from intentional radiators from limited 12,500 microvolts meter measured three
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Application Overview
meters. band edges, tighter limit 3750 microvolts meter applies. Field strength spurious emissions 1/10 fundamental frequency intentional radiator. bandwidth emission shall wider than 0.25 percent center frequency. Bandwidth determined points down from modulated carrier. Although continuous transmissions such voice, video, data permitted, transmission recognition codes allowed. These codes used identify sensor switch that activated identify particular component being part system. intentional radiator restricted transmission control signals such those used with security alarm systems, door openers, keyless entry, remote switches, remote sensing/telemetry, etc. general system consist number transmitters used provide control signals from remote sites. receiver demodulates signal recognizes remote sites; then system initiate response several ways such sounding alarm, making automatic distress call, turning light, opening door, turning sprinklers, etc. Each site coded address that would broadcast indicate intended receiver. Some applications more critical than others, such security alarm distress calling systems. essential that system dependable. receiver extracting reproducing information from modulated (radio frequency) signal that been corrupted noise channel. Consistent recovery error-free replication modulating signal requires receiver which reliable performance. main classes radio frequency receivers are: Tuned radio frequency (TRF) Superheterodyne receivers
Freescale Semiconductor, Inc.
receiver consist several cascaded high gain amplifier tunable bandpass filter stages followed appropriate detector (envelope detector, product detector, (frequency modulation) detector, etc.). reliable receiver (ultra-high frequency) frequencies difficult achieve because appreciable
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
parasitic feedback between output input high gain amplifier chain creates oscillation center frequency. Reducing gain amplifier chain prevent oscillations lower gain will reduce sensitivity receiver. These receivers generally discrete semiconductors since integrated circuits available low-voltage, low-power applications. more reliable stable receiver described this application note superheterodyne type receiver. this receiver, carrier filtered amplified using preamplifier down converted using mixer local oscillator (LO) convenient, lower frequency called intermediate frequency (IF). signal amplified filtered then demodulated using appropriate detector. receiver shown Figure many advantages over receiver. utilizes monolithic integrated circuits (IC), MC13144 cascade low-noise amplifier (LNA), MC13158 main building block components receiver. This receiver offers very stable operation with more than stable gain. Typical sensitivity -100 which allows greater operating distance between transmitter receiver. utilizing varactor-controlled locked external automatic frequency control (AFC) circuit, receiver ability lock onto transmitter. Thus, this receiver system need more expensive crystal oscillator transmitter (Figure implemented using versatile 1-chip, fixed frequency (phase-locked loop) system MC13176D which operates under inexpensive crystal reference source from microcontroller unit, MC68HC705J1A [5]. Baseband processing functions performed MCUs both remote receiver handheld transmitter.
Freescale Semiconductor, Inc.
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Application Overview
ANTENNA
MC13158FTB SINGLE-CONVERSION RECEIVER MC13144 MRFIC0916 DATA
4-MHz FUND XTAL
Freescale Semiconductor, Inc.
SWITCHING OUTPUT
MC68HC705J1A
MC34164
Figure Receiver Block Diagram
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
MC13176D TANK DATA INPUT f/32 REFERENCE INPUT 4-MHz FUND XTAL ENABLE
Freescale Semiconductor, Inc.
MC68HC705J1A
MC34164
GRAYHILL 84BBI-001 KEYPAD
Figure Transmitter Block Diagram
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Description MC13158
Description MC13158
MC13158 integrated, single-conversion, wideband receiver system intended digital analog modulation formats. developed high-performance used battery-operated radio systems, operated below Vdc. MC13158 available 32-lead, low-profile quad flat package (LQFP), which offers small size layout stable performance.
Freescale Semiconductor, Inc.
While ideal receiver recovery GFSK (Gaussian-filtered shift keying), (frequency-shift keying), (frequency modulation) signals, circuit detailed this application note shows MC13158 system reconfigured recover signals. Further details about MC13158 covered this application note found comprehensive device documentation [2]. MC13158 functional blocks include: Differential input mixer 40-dB amplifier 55-dB limiter amplifier Externally tuned quadrature detector Received signal strength indicator (RSSI) Data slicer comparator Carrier detection
mixer differential inputs allowing used balanced single-ended configurations. single-ended input impedance parallel with picoFarads. Access provided base emitter MC13158 internal oscillator transistor attaching oscillator resonant tank circuit. oscillator transistor internally drives mixer operated oscillator greater than MHz. application circuit (see Figure uses varactorcontrolled oscillator (VCO) provide drive approximately MHz.
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
chain split into sections allow bandpass filtering places: Between mixer amplifier Between limiter amplifiers Output impedance driving each filter port which ideal common ceramic filters centered 10.7 MHz. limiter amplifier's internal inputs ground match 10.7-MHz ceramic filters.
Freescale Semiconductor, Inc.
limiter coupled internally quadrature detector inputs, also pinned out. external tank provides selection demodulator tuned frequency detection bandwidth. detected signal brought inverting amplifier buffer. output amplitude swing external feedback resistor from output (pin input inverting amplifier (pin 15). combined with second resistor from input negative supply (pin select output level. RSSI (received signal strength indicator) output provides output current that proportionate logarithm receiver input voltage.
NOTE:
Externally load with resistor VEE. typical transfer gain input drive level. RSSI dynamic range higher than which achieved sensing signal strength each stage limiter amplifiers summing them together. RSSI linearity affected loss placed between amplifier limiter amplifier; total midband attenuation optimal. data slicer comparator more than toggling capability. inverting input (pin non-inverting input (pin have back-to-back diodes across them. recovered signal coupled data slicer input while other grounded; allowed swing about level comparator input. polarity output data depends which input referenced (ground). positive logic data output, data signal goes non-inverting input. Where reference input data slicer
AN1833
More Information This Product, www.freescale.com
MOTOROLA
Application Note Receiver Application Circuit Description/Design
capacitively grounded, size this capacitor nature data signal determine faithfully data slicer shapes recovered signal. control provided shut data slicer output off, 19).
Receiver Application Circuit Description/Design
block diagram receiver controller shown Figure complete schematic MC13144 MC13158 single conversion receiver circuit shown Figure internal on-board transistor used source down convert received 384-MHz carrier signal. tuning frequency controlled automatic frequency control (AFC) circuit created with output from MC13158 quadrature detector buffer amplifier external loop filter. demodulation achieved using MC13158 fast RSSI port. RSSI output data slicer, which shapes recovered RSSI data into rail-to-rail logic swing. following sections, each part receiver explained more detail.
Freescale Semiconductor, Inc.
AN1833 MOTOROLA
More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
ANTENNA MC13144D MRFIC0916 MMBV809L
10.7-MHz CERAMIC VCC2 QUAD DETECTOR MC13158 BIAS VEE2 VCC1
ENABLE RSSI VEE1 ENABLE
Freescale Semiconductor, Inc.
10.7-MHz CERAMIC
#28AWG enameled wire wound drill bit.
Figure Detailed Receiver Circuit
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note External Varactor Controlled Local Oscillator
External Varactor Controlled Local Oscillator
Figure schematic receiver external local oscillator circuit. easy reference, components labelled following discussion. oscillator uses on-board transistor. MMBV809L lowvoltage varactor suitable applications; single varactor SOT-23 package. This oscillator tunable over range approximately (393.8 395.3 MHz) with control voltage VVCO from AFC. Figure curve frequency versus VVCO. Note that frequency decreases with increasing control voltage since varactor diode cathode taken control voltage applied anode. This circuit breadboarded using custom board which ground path lengths minimized. High quality surface mount components were used except where otherwise specified. absolute values components used will vary with layout placement component parasitics. circuit, emitter bias resistor. forms base bias circuit. make Colpitts capacitive divider network. capacitive trimmers oscillator. shunt capacitor across varactor diode, MMBV809L [6], series capacitor used adjust tuning range varying capacitance oscillator circuit. This equation shows relationship: (0.159) [(C1)(C2)] [(C1 C2)] }1/2] where equivalent capacitance relationship )(CB)
Freescale Semiconductor, Inc.
AN1833 MOTOROLA
More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
oscillator tuning range controlled resulting from voltage variable following equation similarity equation above shows this relationship. CV)(CB) oscillator operating frequency estimated next equation, which derived substituting equation equation (1).
Freescale Semiconductor, Inc.
(0.159) [(C1)(C2)] [(C1 C2)] )(CB) 1/2] Solving results (0.159)2 [(C1)(C2)] [(C1 C2)] CV)(CB) where Vdc) oscillator center frequency 394.7 (high side used), value calculated 11.5 more in-depth study, Randall Rhea discusses several oscillator circuits book oscillator design [7].
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note External Varactor Controlled Local Oscillator
MMBV809L
ENABLE VEE1 ENABLE
VControl
Freescale Semiconductor, Inc.
MC13158FTB
#28AWG enameled wire wound drill bit. fine tuned adjusting spacing between windings this core inductor.
Figure Receiver 394.7-MHz Local Oscillator
397.5
Figure
397.0 396.5 FREQUENCY (MHz) 396.0 395.5 395.0 394.5 394.0 393.5 CONTROL VOLTAGE (Vdc)
Figure Frequency versus Control Voltage
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note Automatic Frequency Control
MC13158 receiver uses automatic frequency control (AFC) adjust with respect down convert desired frequency. VCO's output frequency adjusted output voltage from quadrature detector buffer amplifier circuit loop filter. loop filter input taken from buffered output frequency discriminator MC13158. discriminator VOut versus frequency response resonant frequency bandwidth external quadrature tank circuit; while output component determined combination external load feedback resistor, R17, resistor from inverting input ground, R15. detector level, V17, calculated this equation: (R15/R17) (R15/R17)} where diode drop 0.75 Vdc. application circuit, nominally chosen, yielding standard resistor values loop gain settling time buffer amplifier feedback resistor capacitor, respectively. values these loop characteristics left designer's discretion, depending system requirements. Stable frequency acquisition responses within milliseconds have been achieved with schematic values this simple single-pole circuit. closed loop frequency error change frequency. This provides: bias discriminator output offset match loop filter frequency versus voltage response control characteristic
Freescale Semiconductor, Inc.
output (varactor control voltage) decreases with increasing frequency. This system designed high side mixer conversion (the above RF). ground reference varactor taken
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Automatic Frequency Control
ground); thus, frequency increases varactor control voltage decreases. values shown will tune tank 10.7 allow approximately 900-kHz tuning bandwidth. Figure shows pullin hold-in range loop. adjustable coil used tune quadrature detector. resistor sets bandwidth lowering tank circuit. following relationship shows calculate response discriminator resonant tank.
Freescale Semiconductor, Inc.
2(10.7)(1.0) 67.2 then 12.2 thus, 3-dB bandwidth 10.7 12.2 Should overall transmit/receive system prone extreme frequency drift, quadrature coil circuit bandwidth need increased provide adequate tracking range.
Interstage Filtering
Ceramic bandpass filters placed between: Mixer output amplifier input output limiter input (see Figure
They allow improved sensitivity bandwidth, limiting noise RSSI detectors, especially limiter. filters shown schematic have 3-dB bandpass response centered 10.7 which wide. Choice filter bandwidth will affect fidelity recovered baseband signals. data rate increased, filter bandwidth should wider. filter bandwidth affected source impedance output load impedances which MC13158 mixer output amplifier input output impedances match typical 10.7-MHz ceramic filters.
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
Data Recovery Circuit received signal converted from baseband MC13158 RSSI function. RSSI output sources current external load connected produce voltage. choice this load resistance affects receiver performance. Obviously, resulting RSSI gain (VOut/RFIn) directly proportionate this load. When this load large enough, RSSI output will saturate, which will compress high input RSSI transfer response. load good choice obtain monotonic RSSI dynamic range with compression. load impedance chosen also affects RSSI rise fall times (see Figure RSSI output rise fall times more than adequate follow signal amplitude variations rates greater than kHz. data rates less, connected from VEE. These components form pass filter with corner approximately kHz; this helps clean RSSI response under signal conditions. Data rates have been achieved without pass filtering. RSSI coupled data slicer non-inverting input (pin 20). data slicer inverting input terminal referenced with voltage divider diode ground. Temperature stability this reference should considered receiver operating over extended temperature range. data slicer disabled connecting data slicer greater than (VCC will suffice). Should receiver system integrated with transmitter, this will prevent invalid data slicer output from causing problems.
Freescale Semiconductor, Inc.
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Automatic Frequency Control
35.0 RSSI RISE FALL TIMES, (µs) 30.0 25.0 20.0 15.0 10.0 INPUT SIGNAL LEVEL (dBm)
Freescale Semiconductor, Inc.
Figure RSSI Output Rise Fall Times versus Input Signal Level Low-Power Transmitter schematic Figure shows handheld transmitter circuit. comprised MC13176 transmitter, MC68HC705J1A MCU, reference/tripler. reference derived from tripling 4-MHz crystal reference from MCU. this tripler, low-cost transistor, MMBT3904L [8], used with 7-mm shielded transformer that provides 12-MHz resonant tank output transistor also means easily supply collector output. transformer part supplied Toko America (part number 600GCS-8519N). Twelve MHz, third harmonic from 4-MHz crystal, selected resonant circuit formed primary windings between pins transformer external capacitor secondary output transformer uses tapped capacitor transformer provide lower source impedance reference input MC13176 (pin while forming second resonant network. Thus, tripler circuit double tuned network which provides increased selectivity 12-MHz signal.
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
MC13176 enabled data input creating modulation. pins external inductor used resonator current controlled oscillator (CCO). This resonator must high component adjustable align reference source. application circuit uses Coilcraft adjustable 7-mm shielded inductor [10] (part number 150-04J08S). Phase noise MC13176 measures dBc/Hz 10-kHz separation (Figure This offers ample performance wideband system such described this application note.
Freescale Semiconductor, Inc.
Layout Practical Considerations
These layout considerations suggested: double sided which side circuit side where surface mounted components placed where interconnect circuit traces done; other side ground side where leaded components mounted only necessary circuit traces done. Keep traces short possible. Avoid point-to-point wiring; best trace PCB. controlled impedance microstrip lines high frequency portions circuit. ground return paths through ample size holes ground side PCB. Decouple where pins contact trace board. mixed signal applications, isolation digital ground supply lines must. addition, receiver properly shielded decoupled eliminate interference switching high EMI/RFI sources.
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Performance Application Circuit
Performance Application Circuit
receiver, input carrier level allows recovery waveform without jitter tearing kbps (see Figure This improved approximately using preamp bandpass filtering before mixer. Design matching network preamplifier should consider interfacing antenna which would "application specific," depending size type antenna. loop antenna suitable this application discussed book Constantine Balanis [11]. pull-in range hold-in range dependent input drive level. general, under higher drive hold-in pull-in ranges greater. Figure shows plot hold-in range pull-in range versus input level. pull-in range consistent with selectivity bandwidth. application circuit supports data rates kHz. This been confirmed with relaxed interstage baseband filtering. wider filtering much more susceptible interference.
Freescale Semiconductor, Inc.
AN1833 MOTOROLA
More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
TANK
MC13176D
f/32
ANTENNA
Freescale Semiconductor, Inc.
MMBT3904L 4-MHz FUND XTAL
MC68HC705J1A
MC34164P-5
GRAYHILL 84BBI-001 KEYPAD
Figure 384-MHz Transmitter
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Performance Application Circuit
(REG) POut (PEAK)
Freescale Semiconductor, Inc.
PHASE NOISE (dBc/Hz)
FREQUENCY, (Hz)
Figure Phase Noise versus Frequency
395.5
Figure
HOLD-IN, HIGH INPUT FREQUENCY, (MHz)
395.0 PULL-IN, HIGH
394.5 PULL-IN,
HOLD-IN, 394.0
INUPUT LEVEL (dBm)
Figure Capability: Hold-In Pull-In Limits versus Input Level
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note Introduction
low-power wireless remote control system four pieces: Method initiating request such button remote control unit Sending message from transmitter Receiving validating message
Freescale Semiconductor, Inc.
Determining action taken such releasing solenoid turning light microcontroller unit (MCU) remote control unit decodes button that been pressed sends bitstream transmitter. receiver acquires bitstream, converts digital format MCU, which analyzes digital data, determines what operation performed.
Microcontroller Software Overview: Initiate Access Request
battery-powered remote control unit waits extremely low-power sleep mode until someone presses button series buttons unit. (Low-power mode means battery will power unit longer.) Pressing buttons causes wake begin executing internal sequence commands that determine what keys have been pressed. this design MC68HC705J1A [5]. keystrokes stored determine format access request message.
Interrupt Service Routine
When keypad button pressed, asserts input that triggers execution interrupt service routine (ISR). clock feeding MC13176 turns when keypad button depressed. Decoding which depressed done using routines written David Yoder [12]. examines port input values when certain port outputs asserted.
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Microcontroller Software Overview: Initiate Access Request
Sending Message
Freescale Semiconductor, Inc.
When keypad values have been received, ensures logic (transistor-to-transistor logic) data input transmitter enables MC13176 output pins port After waiting transmitter warm logic presented data inputs MC13176 500-microsecond interval representing "front porch." Three preamble characters hex) keypad values received sent serially transmitter MC68HC705J1A using routines written Scott George [13]. turns transmitter enable port initializes software flags buffers, prepares next keypad interrupt, then reenters sleep mode. transmitter flowchart shown Figure Figure
Acquire Validate Access Request
receiver activates itself when sees specific signal exceed strength threshold passes data bits received digital format input port. When sees least 500-microsecond logic receiver input pin, "shutter timer" activated that timing interval equal milliseconds. MC68HC705J1A examines received data, using routines written Scott George [13], ASCII character sequences Start Eight bits logic high data, stop during "shutter timer" period
character data together several subroutines placed buffer memory. Data acquisition terminated when interrupt caused "shutter timer" interval expiring occurs. receiver flowchart shown Figure Figure Figure
Permit Reject Access
receiver buffer examined specific data sequence when data acquisition terminated. least preamble characters received alternating data bits logic (ASCII hex) receiver number broadcast number lower nibble address byte, then will perform actions specified command byte.
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
START
Note: AN1239/D describes connection Grayhill keypad MC68HC705J1A.
INITIALIZE KEYPAD PORT BITS
TURN TRANSMITTER ENABLE
"WAKES WHEN BUTTON KEYPAD PRESSED. EXTERNAL INTERRUPT CAUSES PROCESSOR BEGIN CODE EXECUTION HERE.
Freescale Semiconductor, Inc.
STOP ENTER LOW-POWER MODE INTERRUPT REQUEST Note: KeyPad_Body subroutine that decodes keypad. Refer AN1239/D.
KeyPad_Body
VALID KEYPAD INPUT (ACU ZERO)
FIRST FLAG
STORE KEYPAD INPUT COMMAND BYTE
Send_preamble SHEET DEBOUNCE RELEASE GOES INSTRUCTION FOLLOWING STOP. THIS INSTRUCTION SENDS BACK START. RETURN FROM INTERRUPT STORE KEYPAD INPUT ADDRESS BYTE
FIRST FLAG
Figure Transmitter Flowchart (Sheet
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Microcontroller Software Overview: Initiate Access Request
Send_preamble
SERIAL
ENABLE TRANSMITTER WAIT
Freescale Semiconductor, Inc.
SERIAL WAIT
CREATES LOGIC "FRONT PORCH"
LENGTH
NUMBER PREAMBLE CHARACTERS SENT Note:
AN1240 contains put_char routine. converts byte location char serial data output pin.
CHAR (HEX)
put_char
DECREMENT LENGTH
Send_code
CODE CONTAINS FIRST DECODED KEYPAD VALUE.
LENGTH
CHAR CODE
put_char
CHAR COMMAND COMMAND CONTAINS SECOND DECODED KEYPAD VALUE. SERIAL TRANSMITTER ENABLE
put_char
SHEET
RETURN FROM SUBROUTINE
RESET CODE, COMMAND, FLAG BYTES
Figure Transmitter Flowchart (Sheet
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
main Note: Receiver baud rate pre-determined value constant Baud_Sel.
INITIALIZE STACK POINTER
Init
INITIALIZE DISABLE INTERRUPTS INITIALIZE PINS INITIALIZE SOFTWARE BUFFERS FLAGS
COUNT
Freescale Semiconductor, Inc.
Wait_for_data FOUR BITS DATA LOOK FOUR BITS EQUAL LOGIC DECREMENT COUNT Front_Porch Get_Bit Get_Bit SHOWN AN1240/D.
DELAY
COUNT
RECEIVED BITS
Get_Data
SHEET
Figure Receiver Flowchart (Sheet
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Microcontroller Software Overview: Initiate Access Request
Get_Data
INITIALIZE TIMER REGISTER
ALLOW INTERRUPTS
Freescale Semiconductor, Inc.
BUFFER INDEX
BUFFER INDEX LENGTH
main_loop
get_char
BYTE BUILT FROM PORT INPUT get_char ROUTINE SHOWN AN1240/D. BUFFER (INDEX) BYTE RECEIVED
INDEX COUNT
WAIT TIMER INTERRUPT
check_msg_format SHEET WHEN TIMER INTERRUPT OCCURS. INCREMENT INDEX COUNT
Figure Receiver Flowchart (Sheet
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
check_msg_format RECEIVE BUFFER DIAGRAM BUFFER INDEX BUFFER INDEX VALUE EXPECTED DATA UNIT ADDRESS COMMAND DON'T CARE
RESET SOFTWARE FLAGS
Freescale Semiconductor, Inc.
look
BUFFER (INDEX) INCREMENT INDEX COUNT
FLAG
BUFFER INDEX (ADDRESS BYTE)
FLAG
prev55
INDEX COUNT
RECEIVE VALID PREAMBLE
BUFFER (INDEX) ADDRESS?
toggle
BUFFER INDEX (COMMAND BYTE)
BUFFER (INDEX) B'CAST?
THIS UNIT'S ADDRESS
main BUFFER (INDEX) TURN SHEET
BUFFER (INDEX)
TURN
DEFECTIVE COMMAND BYTE
Figure Receiver Flowchart (Sheet
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Conclusions
Conclusions
MC13144 MC13158 excellent solutions stable receiver part applications such keyless entry security systems where high reliability performance essential. High performance attributes have been demonstrated successfully integrated into low-cost communication system. varactor-controlled oscillator capable tuning over suitable frequency range low-supply voltage. Driving with network provides compensation expected transmitter carrier drift. This overcomes need expensive crystal-controlled transmitter/receiver system. Narrow band filters improve selectivity assist achieving receiver's sensitivity -100 dBm. With only three minimum number external components, low-cost objective met. MC13176 offers versatile transmitter using external components exceeds performance criteria needed adhere regulations. also fits manufacturing cost goals. Both components interface well with MC68HC705J1A provide more robust dependable data recovery which ensures errorfree switching remote devices.
Freescale Semiconductor, Inc.
AN1833 MOTOROLA
More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note References
Code Federal Regulations, Title U.S. Government Printing Office, Washington, 1992, Part 15.231. Noise Amplifier Advance Information; document order number MC13144/D; Motorola, Inc. Wideband Subsystem Dect Digital Applications, document order number MC13158/D; Motorola, Inc.
Freescale Semiconductor, Inc.
FM/AM Transmitter; document order number MC13176/D; Motorola, Inc. MC68HC/HRC/HSC/HSR705J1A Technical Data; document order number MC68HC705J1A/D; Motorola, Inc. Small Signal Transistors, FETs, Diodes, Motorola document order number DL126/D. Rhea, Randall Oscillator Design Computer Simulation. Prentice Hall, Inc., Englewood Cliffs, 1990. General-Purpose Transistor, Silicon; document order number MMBT3904L/D; Motorola, Inc. 600GCS-8519N Coil Specification. Toko America, Inc., Prospect, [10] 150-04J08S Coil Specification, Coilcraft, Cary, [11] Balanis, Constantine Antenna Theory: Analysis Design. Wiley, 1982, pp.169-184. [12] Yoder, David. HC05 Keypad Decoding Techniques Using MC68HC705J1A; document order number AN1239/D, Motorola, Inc. [13] George, Scott. HC05 Software-Driven Asynchronous Serial Communication Techniques Using MC68HC705J1A; document order number AN1240/D; Motorola, Inc. [14] Sibigtroth, James Understanding Small Microcontrollers, document order number M68HC05TB/D; Motorola, Inc.
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Code Listing
Code Listing
Transmit Microcode Power Wireless Remote Control Unit Revision 7.1.98.2 Grayhill Keypad Decode keypad inputs, activate transmitter send message code first keypad input command second keypad input Equates: serial_port status_port noise frame BAUD_SEL
Freescale Semiconductor, Inc.
port used serial port pins port used driving LED's. noise frame receive data transmit data transmitter enable BAUD_SEL 4MHz 19.2k 9600 9600 4800 4800 2400 2400 1200 1200 start space data register temp storage variable preamble counter debounced output storage debounced output storage software flags first input done flag
char count length code command flag
Start Program Space *Start Initializes hardware enables interrupts. Start: KeyPdInt_Init: #$00 reset stack pointer port register zeroes PORTA DDRA Port direction Inputs
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
PORTB #$3F Port register zeroes Port direction output (transmitter switch) output (serial data out) output (output switch) output (output switch) output (output switch) output (output switch) implement direction bits Port load lower nibble port when keypad button pushed port interrupt occurs ensure puldowns port enabled Allow interrupts hardwired logic interrupt from this pin) waiting interrupt from Port bits
DDRB #$0F
Freescale Semiconductor, Inc.
PORTB PDRA
stop conserve power waiting keyboard interrupt start getting back stop when comes back Send_preamble routine that sends character stream transmitter Character string code command Send_preamble code bclr txd,serial_port ensure serial bset xmt,serial_port turn transmitter wait stable frequency generation #$05 load millisecond constant DelaymS2_Body delay routine generate microsecond logic "front porch" bset txd,serial_port ensure serial high #$50 generate micrsecond delay_13a delay trigger receiver send three preamble characters load count sending length number 'preamble' char load preamble character char put_char send character char length decrement count alt_ones send another zero
shutdown
STOP
alt_ones
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Code Listing
Send_code
route address `code' routine that sends code char key-pad character send key-pad character insert cycle timing stall receiver transmitter routines take same time between sent characters
char char char put_char
send address byte
Freescale Semiconductor, Inc.
route command byte "command" routine that sends command command code char insert cycle timing stall receiver transmitter routines take same time between sent characters char char char put_char send command byte turn transmitter initialize buffers next time bclr bclr txd,serial_port xmt,serial_port code command flag ensure serial zero turn transmitter
Routine from AN1240 written Scott George put_char ;[2] sending data bits ;[2] clear carry start put_data_bits send_0 ;[3] carry<>0, then bset txd,serial_port ;[5] send jmp_bit ;[3] finished sending send_0 bclr txd,serial_port ;[5] else send jmp_bit ;[3] finished sending jmp_bit #2*(BAUD_SEL-1)-1 ;[2] prepare delay delay_13a ;[13a+12] execute delay routine tsta ;[3] timing purposes only char ;[5] next data send AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
decx put_stop_bit bset ;[3] sent, count ;[3] loop more bits send ;[2] timing purposes only ;[5] send ;[2] prepare delay ;[13a+12] execute delay routine ;[6] exit (put_char)
put_data_bits
txd,serial_port #2*(BAUD_SEL-1) delay_13a
Freescale Semiconductor, Inc.
Delay routine from AN1240 written Scott George delay_13a ;[2] this 13-cycle loop ;[2] tsta ;[3] deca ;[3] decrement loop count delay_13a ;[3] loop count zero ;[6] exit (delay_13a* Delay routine from AN1240 written Scott George DelaymS2_Body: DelaymS2010 DelaymS2020 decx ;JSR here ;Load delay into Decrement delay burn cycles Branch done ;Service WDOG ;Note that will ;always zero here ;Burn cycles ;decrement ;branch done ;return 3-\| 3-/|
#$F8
DelaymS2020 COPR
DelaymS2030
deca
DelaymS2010
Original Routine from AN1239 written David Yoder modified low-power Wireless Remote Control Tranmitter Receiver Interrupt Service Routine This external interrupt service routine. Both external interrupt IRQ_ keypad interrupts this routine. Note that this version, interrupt interpreted having only keypad source KeyPdInt_Isr: KeyPad_Body KeyPdInt_Isr090 decoding external interrupts should done here. external keypad interrupt share this vector.
KeyPdInt_Isr010:
;See pressed down, return save power AN1833
More Information This Product, www.freescale.com
MOTOROLA
Application Note Code Listing
KeyPdInt_Isr020: KeyPdInt_Isr030: brset bset get2nd
DelaymS2_Body KeyPad_Body KeyPdInt_Isr090
;Debounce ;Jump delay routine ;Get keypress down, return down branch first seen store address code first flag wait release store command byte send preamble code
first,flag,get2nd code first,flag KeyPdInt_Isr080 command Send_preamble
Freescale Semiconductor, Inc.
KeyPdInt_Isr080: KeyPdInt_Isr090: bset
KeyPad_Body KeyPdInt_Isr090 KeyPdInt_Isr080
check been released pressed exit else wait release
;Delay ;Debounce release ;Clear interrupt requests generated bounce bclr xmt,serial_port turn transmitter ;Return from Interrupt (KeyPdInt_Isr) ;Interrupts happen code main routine after this been called once. ;Remember this when changing main routine! This keypad decode routine from AN1239 written David Yoder KeyPad_Body This subroutine decodes matrix keypad port KeyPad_Body: KeyPad010: decx AN1833 MOTOROLA More Information This Product, www.freescale.com portb #$f0 KeyPad_Table+1,x portb porta #$0F KeyPad_Table,x KeyPad030 ;Get value port allow high nibble change ;Get decode value from table ;Write Port ;Get value port ;Throw columns read only rows ;See high nibble pulled found, branch ;Decrement thrice point ;Load with offset last ;entry table #{KeyPad_Table_Top KeyPad_Table}
#!10 DelaymS2_Body IRQR,ISCR
Freescale Semiconductor, Inc. Application Note
decx decx KeyPad030: KeyPad035: tsta KeyPad040 KeyPad_Table+2,x ;Load code into Acc. ;Store now. ;'Help' pulldowns driving lines low. This minimizes current draw while debouncing. ;Get result back ;Set flags calling routine them decisions. ;Return with result value ;Table keypad decode values codes. ;Fill your codes. Codes must byte each. Currently which duplicates found. This result limiting codes bits display PA[4.7] Column KeyPad_Table: $01,$01,$F1 $01,$02,$F2 $01,$04,$F3 $01,$08,$FA $02,$01,$F4 $02,$02,$F5 $02,$04,$F6 $02,$08,$FB $04,$01,$F7 $04,$02,$F8 $04,$04,$F9 $04,$08,$FC $08,$01,$FF $08,$02,$FE $08,$04,$FF KeyPad_Table_Top $08,$08,$FD #INCLUDE 'H705J1A.FRK' ;Include equates HC705J1A ;Enable Port Interrupts used mask part, sure specify this option. ;Enable level sensitivity IRQs SOSCD Short Oscillator delay enable AN1833 More Information This Product, www.freescale.com MOTOROLA next value table KeyPad010 #$00 KeyPad035 below bottom table again. decoded, ;Return with null character
portb #$F0 portb
Freescale Semiconductor, Inc.
Application Note Code Listing
EPMSEC EPROM Security OSCRES Ocscillator Parallel Resistor SWAIT Stop Instruction Mode SWPDI Port Pulldown Inhibit PIRQ Port Interrupt Function LEVEL Edge Sensitivity COPEN Watchdog enable ;Software pull down inhibit ;Stop Halt disabled ;OSC parallel resistor disabled ;EPROM security ;Short recovery disabled
Freescale Semiconductor, Inc.
RESET Start IRQ_INT KeyPdINt_Isr
Receiver Microcode Power Wireless Remote Control Unit REVISION 7.9.98.2 Full Functional Description Routine Design: Program flow: Main/Reset: Call init intialize port pins interrupts Clean buffers Part Specific Framework Include Section #INCLUDE 'H705J1A.FRK' Include equates HC705J1A labels found. Equates Storage Equates: serial_port port used serial port pins status_port port used driving LED's. noise noise frame frame receive data transmit data passflag timer monitor Program Constant Equates: AN1833 MOTOROLA More Information This Product, www.freescale.com Baud rate select table:
Freescale Semiconductor, Inc. Application Note
BAUD_SEL BAUD_SEL 4MHz 2MHz 19.2 9600 9600 4800 4800 2400 2400 1200 1200
variable allocation: char incoming data register count temp storage variable cmpr compare register xcnt counter length index pointer storage buffer receiver buffer flag flag bits ******************************* beginning EPROM space ******************************* start main reset stack pointer clear flags init initialize port pins ints load counter count Wait_for_data brset rxd,PORTB,front_porch branch incoming data xcnt increment count Wait_for_data check incoming data #$00 carry clear count look_again xcnt back examining data Wait_for_data frontporch -takes 4-bit sample looks logic front_porch get_bit ;[39] sample data rora ;[3] noise carry rorx ;[3] carry noise data rora ;[3] filtered data carry char ;[5] carry char #2*(BAUD_SEL-3) ;[2] prepare delay delay_13a ;[13a+12] execute delay routine tsta ;[3] timing purposes only count ;[5] received, count front_porch ;[3] loop more bits #$f0 check value received char looking bits get_data four logic bits received wait incoming data main invalid frontporch -restart
Freescale Semiconductor, Inc.
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Code Listing
Freescale Semiconductor, Inc.
get_data routine that acquires data puts into receive buffer. timer interrupt expected exit path. timer interval msec get_data #$1C initialize timer register TSCR allow interrupts clear initialize index length store memory main_loop get_char receive byte data from char current character length load buffer index buffer,x store character recv buffer check buffer full length count (buffer full) wait here interrupt receive buffer full waiting timer interrupt- expected exit point RTI_int length increment buffer pointer main_loop another byte **** Entry point timer interrupt routine **** Timer_SVR RTI_int Real Time Interrupt routine disable interruptss #$0C clear timer overflow flag clear flag Timer overflow disable Real Time Interrupt disable TSCR check_msg_forma initialize index length location length flag clear flags length load index register #$55 looking char look buffer,x buffer character char check it's got_one branch next incx length looked possible 55s? first three buffer length locations done branch look back look some more AN1833 MOTOROLA More Information This Product, www.freescale.com waiting_for_int waiting_for_int
Freescale Semiconductor, Inc. Application Note
got_one brset bset 0,flag,prev55 0,flag next #$f5 buffer,x toggle #$fc buffer,x toggle main branch previously flag look another code character buffer compare address desired this
prev55 value changes
execute command byte address byte match compare broadcast address execute command byte broadcast address match else- reset everything wait front porch
Freescale Semiconductor, Inc.
done
command byte checking toggle bset bclr #$FA buffer,x turnon #$FB buffer,x turnoff done 5,portb done 5,portb done index command byte check command branch turn command compare turn command branch turn command else invalid command port command executed reset port command executed
turnon
turnoff
init initialize port pins, disable interrupts. Clear buffers flags called main input cond. none output cond. Port output input stack used bytes variables used none init port pins inputs DDRA (all port pins grounded) #$20 port output device turned DDRB input data from receiver #$00 load ISCR external interrupts from Port ISCR #$0C load TSCR (timer Control) turn RTIC= enable, clear RTIFlag AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Code Listing
Freescale Semiconductor, Inc.
incx incx incx incx
TSCR flag char length buffer,x buffer,x
enable, clear Flag clear buffers clear flag cleaar receiver memory location clear index counter
clear receive buffer location location
buffer,x location buffer,x location buffer,x
incoming/get_char Routine from AN1240 written Scott George called get_data input cond. defined input expecting preamble character where four bits logic followed series get_char receive byte data from pin; called main input cond. defined input output cond. char contains received data; X,ACC undefined; half carry (frame error occurred) frame error); carry (noise and/or frame error occurred) noise) stack used bytes variables used char: storage received data byte) count: temporary storage byte) used bytes incoming: get_char ;[2] receiving data bits count ;[4] store value into clrx ;[3] used store noise data get_start_bit brclr brset lsra tsta tsta rxd,serial_port,* rxd,serial_port,* #BAUD_SEL-3 delay_13a get_bit ;[5] wait until rxd=1 ;[5] wait start ;[2] prepare delay ;[13a+12] execute delay routine ;[39] sample start ;[3] noise carry; acc=filtered start ;[3] false start, start over ;[3] timing purposes only ;[3] timing purposes only ;[2] prepare delay ;[13a+12] execute delay routine
get_start_bit
#2*(BAUD_SEL-2) delay_13a
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
get_data_bits rora rorx rora tsta get_stop_bit lsra get_bit ;[39] sample data ;[3] noise carry ;[3] carry noise data ;[3] filtered data carry ;[5] carry char ;[2] prepare delay ;[13a+12] execute delay routine ;[3] timing purposes only ;[5] received, count ;[3] loop more bits ;[39] sample stop ;[3] noise carry acc=filtered stop ;[4] store stop count ;[3] noise, then branch ;[2] ;[3] ;[3] noise data noise with char, result=0, then noise data reception
char #2*(BAUD_SEL-3) delay_13a count get_data_bits get_bit
Freescale Semiconductor, Inc.
count yes_noise
char no_noise
yes_noise
coma lsra
#$08 #$08 count
;[2] noise (half carry) ;[2] adding ;[3] ;[3] ;[3] ;[6] retrieve stop data bit, complement shift into carry frame error exit (get_char)
no_noise
Routine from AN1240 written Scott George get_bit receive filtered data noise info; called get_char frontporch input cond. defined input output cond. 000000dn, where filtered data, noise info stack used bytes variables used none used bytes get_bit clra ;[3] used sampled bits brset rxd,serial_port,samp_1;[5] sample into carry samp_1 ;[3] brset rxd,serial_port,samp_2 ;[5] sample into carry samp_2 ;[3] brset rxd,serial_port,samp_3 ;[5] sample into carry samp_3 ;[3] ;[6] exit (get_bit)
AN1833 More Information This Product, www.freescale.com MOTOROLA
Application Note Code Listing
Freescale Semiconductor, Inc.
Routine from AN1240 written Scott George delay_13a delay 13*ACC cycles; called get_char front porch input cond. appropriate value (13*ACC cycles) output cond. stack used bytes variables used- none used bytes delay_13a ;[2] this 13-cycle loop ;[2] tsta ;[3] deca ;[3] decrement loop count delay_13a ;[3] loop count zero ;[6] exit (delay_13a) Bytes Definitions Main Routine Interrupt Reset vectors Main Routine RESET When reset occurs, routine main main Timer_INT When interrupt occurs, routine Timer_SVR Timer_SVR
AN1833 MOTOROLA More Information This Product, www.freescale.com
Freescale Semiconductor, Inc. Application Note
Freescale Semiconductor, Inc.
Motorola reserves right make changes without further notice products herein. Motorola makes warranty, representation guarantee regarding suitability products particular purpose, does Motorola assume liability arising application product circuit, specifically disclaims liability, including without limitation consequential incidental damages. "Typical" parameters which provided Motorola data sheets and/or specifications vary different applications actual performance vary over time. operating parameters, including "Typicals" must validated each customer application customer's technical experts. Motorola does convey license under patent rights rights others. Motorola products designed, intended, authorized components systems intended surgical implant into body, other applications intended support sustain life, other application which failure Motorola product could create situation where personal injury death occur. Should Buyer purchase Motorola products such unintended unauthorized application, Buyer shall indemnify hold Motorola officers, employees, subsidiaries, affiliates, distributors harmless against claims, costs, damages, expenses, reasonable attorney fees arising directly indirectly, claim personal injury death associated with such unintended unauthorized use, even such claim alleges that Motorola negligent regarding design manufacture part. Motorola registered trademarks Motorola, Inc. Motorola, Inc. Equal Opportunity/Affirmative Action Employer.
reach
USA/EUROPE/Locations Listed: Motorola Literature Distribution; P.O. 5405, Denver, Colorado 80217. 1-303-675-2140 1-800-441-2447 JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3-20-1, Minami-Azabu, Minato-ku, Tokyo 106-8573 Japan. 81-3-3440-3569 ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Centre, King Street, Industrial Estate, N.T., Hong Kong. 852-26668334 Technical Information Center: 1-800-521-6274 HOME PAGE:
Motorola, Inc., 2000
AN1833/D More Information This Product, www.freescale.com

Other recent searches


Win95 - Win95   Win95 Datasheet
TLK3138 - TLK3138   TLK3138 Datasheet
STB30NE06L - STB30NE06L   STB30NE06L Datasheet
SH7047F - SH7047F   SH7047F Datasheet
SH7065 - SH7065   SH7065 Datasheet
SF5SC4 - SF5SC4   SF5SC4 Datasheet
ROS-2041-119+ - ROS-2041-119+   ROS-2041-119+ Datasheet
NL27WZ07 - NL27WZ07   NL27WZ07 Datasheet
LM181E06 - LM181E06   LM181E06 Datasheet
CT1487M - CT1487M   CT1487M Datasheet
CT1589M - CT1589M   CT1589M Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive