CML Microcircuits CMX649 Application Note Download Page 11

CMX649 Wireless Voice Link Design Guide

 

©

 2004 CML Microcircuits 

 

Page 11 of 42 

a dramatic reduction in current consumption, thereby enhancing battery life and talk-
time.   
 

4.2.2 Receiver 

 

When receive mode is selected, the MICRF505 control registers are adjusted to 
cause the following actions to occur: 

• 

Receive mode selected. 

• 

Synchronous data mode selected. 

• 

LNA not bypassed. 

• 

Sallen-Key filter bandwidth set to 340kHz. 

• 

Main channel filter disabled. 

• 

Lock detect enabled. 

 
The antenna input is amplified by a LNA that drives a quadrature mixer.  The mixer 
output is amplified and presented to a Sallen-Key low-pass filter, whose bandwidth is 
set to 340kHz to prevent attenuation in the signal passband.   
 
The main channel filter is bypassed in this application by setting bit 6 of Control 
Register 0x02 to 1.  The reason for doing this involves a tradeoff between current 
consumption, voice quality and BER performance, and is explained as follows. 
 
The formula for estimated receive bandwidth is: 
 

f

BW

 = f

offset

 + f

dev

 + (Baudrate/2) 

 

…where f

dev 

and

 

f

offset 

are as previously defined,

 

and f

BW

 is the required receive 

bandwidth.  Substituting previously calculated values yields the estimated receive 
bandwidth: 
 

f

BW

 = 20kHz + 186.7kHz + (166.6kHz/2) 

 290kHz 

 
The bandwidth of the main channel lowpass filter must be higher than the required 
receive bandwidth to prevent attenuation of energy in the signal passband. 
 
A single 8MHz crystal translates to a maximum main channel lowpass filter cutoff 
frequency of 200kHz, significantly lower than the required bandwidth of 290kHz.  
This situation would cause significant attenuation of energy in the passband, with a 
corresponding degradation of BER.   
 
Three potential remedies for this situation exist: 

1.  Use two crystals to increase main channel lowpass filter cutoff frequency. 
2.  Reduce the baud rate to reduce the required bandwidth. 
3.  Bypass the main channel lowpass filter and keep the same baudrate. 

 
Option 1 requires an extra crystal that presents additional cost and board space.  
Option 2 is undesirable because a baudrate reduction would jeopardize either the 
voice quality or the TDD nature of the application.  Empirical data suggests that 
option 3 is an acceptable compromise so long as the Sallen-Key filter bandwidth is 

Summary of Contents for CMX649

Page 1: ...inks The purpose of this document is to present an example design that combines the CMX649 with other external components in a small form factor low power fully functional two way wireless voice link This document presumes that the reader is familiar with the CMX649 and ADM voice coding Additional background information can be obtained from the following application notes which can be found at www...

Page 2: ...cillator 12 4 2 4 Frequency Synthesizer 12 4 3 Microcontroller MSP430F1232 13 4 3 1 Data Buffering Scheme 15 4 4 Battery 18 4 5 Voltage Regulators 19 4 6 Peripheral Functions 19 5 Firmware Description 20 5 1 1 Interrupt Vectors 21 5 1 2 RESET 21 5 1 3 SETUP649 23 5 1 4 SETUPRF 23 5 1 5 MAINLOOP 24 5 1 6 START_RFTX 25 5 1 7 SET_RF_TX 25 5 1 8 RFCHIPTX 26 5 1 9 START_RFRX 28 5 1 10 SET_RF_RX 30 5 1 ...

Page 3: ... materials BOM cost 3 Description of Operation Two main circuit areas comprise this wireless voice link design a base unit also called the master and a headset unit also called a slave Each unit contains Voice codec CML Microcircuits CMX649 RF transceiver Micrel MICRF505 Microcontroller Texas Instruments MSP430F1232 In addition to these three core products other functions such as battery low dropo...

Page 4: ... present in wireless environments The encoded voice data is passed to the MSP430F1232 microcontroller where it is buffered and assembled into frames The microcontroller then passes the data frames to the MICRF505 RF transceiver for transmission to a paired board The MICRF505 transmits the data frame at an over the air rate of 166 6kbps on a transmission frequency determined by software configurati...

Page 5: ...es 4 Hardware Description 4 1 Voice Coding CMX649 The CMX649 is ideal for this design because of its robust voice coding low power consumption and highly integrated feature set Some of the many features of this innovative chip are Full duplex ADM CVSD Linear PCM µ law PCM and A law PCM Ability to transcode between coding schemes Low power consumption 2 5mA Vdd 3 0V typical Data clock recovery Flex...

Page 6: ...iods The noise canceling microphone output signal is amplified by the CMX649 internal microphone amplifier The gain and frequency response of this microphone amplifier is determined by external components The amplified microphone signal passes through the CMX649 programmable anti alias filter before arriving at its ADM encoder The programmable anti alias filter bandwidth is set to 2 9kHz in softwa...

Page 7: ...opagating through to the other components This capability is possible due to the wide range of power supply voltage that the TPA6203 can accept The Cbypass capacitor was added to enhance the amplifier s power supply rejection ratio PSRR The recommended 10µF Cbypass capacitor is a relatively expensive component so the end customer should decide whether the improvement in PSRR is worth the extra cos...

Page 8: ... in MHz 0 863 0 1 863 5 2 864 0 3 864 5 4 865 0 Table 1 RF Channels Used in Project The MICRF505 can be easily adjusted to conform to other frequency bands such as the 902 928MHz ISM industrial scientific and medical license free frequency band used in the USA In order to modify this design to support operation in other frequency bands the following items must be considered Crystal frequency may n...

Page 9: ...ication NOTE The Refclk_K value is also used to calculate the modulator clock signal fMOD_CLK and bit synchronizer clock signal fBITSYNC_CLK so be aware of this in your calculations Changes in Refclk_K will cause changes in three different clock signals It may be desirable from a programming complexity standpoint to only change the BitRate_clkS value to accomplish bitrate clock programming The clo...

Page 10: ... times the bit rate the transmit data signal is Gaussian filtered with a BT 1 0 maximum filtering The frequency deviation must be programmed such that the modulation index is always greater than or equal to two The modulation index can be represented as follows Baudrate xf 2 Index Modulation dev where fdev is the single sided frequency deviation offset dev f Baudrate f and foffset is the total fre...

Page 11: ...v and foffset are as previously defined and fBW is the required receive bandwidth Substituting previously calculated values yields the estimated receive bandwidth fBW 20kHz 186 7kHz 166 6kHz 2 290kHz The bandwidth of the main channel lowpass filter must be higher than the required receive bandwidth to prevent attenuation of energy in the signal passband A single 8MHz crystal translates to a maximu...

Page 12: ... for fBITSYNC_CLK in this application The receive signal strength indicator RSSI while potentially beneficial for some applications is not needed in this project and is therefore not used 4 2 3 Crystal Oscillator The MICRF505 crystal oscillator in this design is based on an 8MHz external crystal The MICRF505 provides the ability under software control to fine tune the oscillator frequency by addin...

Page 13: ... order for this to work as described The charge pump is set to 125µA by clearing bit 7 in control register 0x02 The PLL second order loop filter uses component values that have been calculated based on the following parameters 166 6kbps data rate 3kHz loop bandwidth 60 phase margin 67MHz V VCO gain 125µA charge pump current Several third party loop filter calculator programs are available includin...

Page 14: ...l operations When the design is placed in sleep mode the watchdog timer occasionally causes the circuitry to power up and check for the presence of audio signals The A D converter provided in the MSP430F1232 is unused in this design A likely use for this function in a production design would be for temperature monitoring to allow for dynamic crystal frequency trimming The following tables describe...

Page 15: ... line slave in master out Output N A P3 2 MICR505_DATAIXO MICRF505 data interface SPI output line slave out master in Input N A P3 3 MICR505_DATACLK MICRF505 data interface clock input line Output N A P3 4 649TXDATA CMX649 encoded data output Input N A P3 5 649CSN CMX649 CBUS interface chip select line Output High P3 6 649_505_SCLK Serial clock signal for both the CMX649 SCLK CBUS interface and th...

Page 16: ...nsmit RFTX_BUF and receive RFRX_BUF modes Two microcontroller registers are used as counters to track the flow of data in and out of RFTX_BUF These counters called FROM649_CNTR and TORF_CNTR are set to their maximum values when the transmit mode is first started The FROM649_CNTR counter is decremented with each byte of encoded voice data that is passed from the CMX649 to the MSP430F1232 As the RFT...

Page 17: ...transmission via the microcontroller s USART0 The TORF_CNTR is decremented for each byte of data that is passed from the microcontroller to the MICRF505 When the last byte of data is transferred out of RFTX_BUF both FROM649_CNTR and TORF_CNTR have achieved their minimum values A four byte dummy packet is passed to the MICRF505 to ensure that all of the actual data has been transmitted and the micr...

Page 18: ...t This particular battery was chosen because of its very small form factor and sizeable energy capacity The current consumption of this design is dependent on many factors including how often the user speaks into the unit the volume with which the user speaks the volume setting for the unit s speaker and the RF power setting The observed value for current consumption during normal conversation is ...

Page 19: ... more information on this battery and related battery charging issues please visit www ultralifebatteries com 4 5 Voltage Regulators Two low voltage dropout LDO regulators from Maxim are used in this design The low noise MAX8510EXK25 is used to translate the nominal 3 7V battery voltage to 2 5V for the RF transceiver and the low noise MAX8511EXK33 produces the 3 3V for the other integrated circuit...

Page 20: ...tivity detector VAD to determine when voice audio is present This allows the Master board to decide when to power save i e after periods where voice audio is consistently absent and when to wake from power save i e when voice audio has been detected The firmware source code for this project was written in assembly language and was compiled using the IAR Embedded Workbench from IAR Systems More inf...

Page 21: ...wer up UART0TX_VECTOR RFCHIPTX Called when ready to Tx a new byte UART0RX_VECTOR RFCHIPRX Called once a byte has been received TIMERA0_VECTOR CMX649_TRANSFER Called when ready to exchange data with the CMX649 PORT1_VECTOR and PORT2_VECTOR BUTTON_DEBOUNCE Debounce routine Table 4 Interrupt Vectors 5 1 2 RESET When the circuit is powered up the MSP430F1232 will begin program execution at the RESET i...

Page 22: ...al has stabilized Stop uC DCO clock Conf igure uC USART0 Setup uC TimerA Initialize Master Slav eIDs Initialize counters f or v oice codec RF transceiv er Conf igure block sy nchronization Call SETUP649 Initialize preamble counter Initialize program status f lags Clear uC Port 1 Port 2 interrupts Call UPDATE649_VOL Call SETUPRFand leav e in standby Initialize commands f or Master Slav e Enable all...

Page 23: ... bit clocks i e sampling clocks derived from xtal clk input 0x81 0x88 No encoder or decoder IRQs 0xD0 0x00BE ADM decoder configured for normal operation decode VAD output driven to 1 to activate microphone circuit DECVAD pin controls FET that stops current flow to the microphone when required 0xD1 0x4999 Syllabic time constant 1 2ms 4 of 4 companding rule estimator time constant 0 8ms second order...

Page 24: ...x06 0x6E Mod_clkS 6 BitSync_clkS 14 0x07 0xC3 BitRate_clkS 3 RefClk_K 3 0x08 0xC1 ScClk_X2 1 ScClk 1 0x0A 0x0E A0 14 0x0B 0x00 0x0C 0x6B N0 107 0x0D 0x00 0x0E 0x10 M0 16 Table 6 MICRF505 Configuration in SETUPRF Subroutine The setting for control register 0x3F XCO tuning register is dependent on the amount of tuning required for the crystal oscillator circuit and as such is application dependent 5...

Page 25: ...T_RFTX When the START_RFTX subroutine is called the transmit flag bit in the PROG_FLAGS variable is cleared the SPI port is primed with 0xAA and the preamble counter is initialized to 48 which is the number of preamble bytes to be sent after the transmitter is enabled The output buffer counter TORF_CNTR is initialized to 84 counter range is from 83 to 0 and the SET_RF_TX subroutine is called When ...

Page 26: ...ze after which time the subroutine ends and control is transferred back to the START_RFTX subroutine 5 1 8 RFCHIPTX An interrupt is issued in transmit mode when a byte of data can be written to the USART0 transmit buffer When this interrupt occurs the firmware vectors to the RFCHIPTX interrupt service routine ISR The RFCHIPTX ISR first determines if the entire amount of preamble has already been t...

Page 27: ... TX buffer Return from interrupt Yes No Copy next byte to be transmitted into R6 Shift upper nibble of R6 into lower nibble position Set flag indicating upper nibble has been sent Mask upper nibble of R6 Manchester encode R6 value place result in uC TX buffer Have all bytes been sent Return from interrupt Yes No Copy next byte to be transmitted into R6 Clear flag to indicate upper nibble needs to ...

Page 28: ...neral I O P3 6 649_505_SCLK General I O P3 7 649_505_CMD General I O Table 8 Microcontroller Port 3 Configuration in START_RFRX Subroutine The receive flag bit in the PROG_FLAGS variable is cleared and the input buffer counter FROMRF_CNTR is initialized to 84 The sync word flags in the PROG_FLAGS variable are set to indicate that both sync words need to be received The upper nibble flag is cleared...

Page 29: ...r Counter FROMRF_CNTR Set flags to indicate sync words not yet received Clear flag to indicate upper nibble received Ensure Master Slave IDs no longer match Call SET_RF_RX Initialize preamble and Rx duration counters Has Sync Word 2 been received No Return Enable Rx interrupt Yes Has Tx mode been enabled Yes No Figure 10 START_RFRX Subroutine ...

Page 30: ... a test is performed to see if Sync Word 1 has already been received If Sync Word 1 has not yet been received the subroutine shifts the data word one bit position increments the shift counter and compares the new data word to the expected sync word If a match is found a flag is cleared to indicate that Sync Word 1 is no longer needed the number of required bit shifts is stored for future reference...

Page 31: ...te actually includes only four bits of real data For this reason the decoded data byte is effectively split into upper and lower nibbles and processed accordingly A flag is used to indicate whether the upper or lower nibble is needed and once both nibbles have been decoded the FROMRF_CNTR is decremented Transmit and receive interrupts are disabled when FROMRF_CNTR becomes negative as this indicate...

Page 32: ...ement preamble counter Has enough preamble been receiv ed Return f rom interrupt Place two most recent Rx d by tes into R6 R7 assemble into data word Reset Shif t Counter R10 Sy nchronize current and last Rx d by tes on by te boundaries Sy nc By te 2 already receiv ed Yes No C Load number of shif ts required to align by tes A Figure 11 RFCHIPRX Interrupt Service Routine ...

Page 33: ...per nibble already decoded Perf orm Manchester decoding on R7 v alue place result in R6 No Mask of f lower nibble of Manchester decoded v alue in R6 Mov e R6 upper nibble to RXRF_BUF Set f lag indicating upper nibble already decoded Return f rom interrupt Mask of f upper nibble of Manchester decoded v alue in R6 Yes Add R6 lower nibble to RXRF_BUF Clear f lag to indicate upper nibble not decoded D...

Page 34: ... 2 are still needed No Figure 13 RFCHIPRX Interrupt Service Routine continued 5 1 12 CMX649_TRANSFER The MSP430F1232 s TIMER_A is used with a bit banging routine to emulate a second SPI port for microcontroller to CMX649 communications When the TIMER_A issues an interrupt the CMX649_TRANSFER interrupt service routine is called The master unit s CMX649_TRANSFER ISR which is responsible for handling...

Page 35: ...e Decrement FROM649_CNTR Do Master Slav e IDs match Send idle pattern to CMX649 No Yes A No Rx duration counter expired Yes Decrement duration counter No Volume debounce counter expired Yes Decrement v olume debounce counter No Channel debounce counter expired Yes Decrement channel debounce counter Figure 14 CMX649_TRANSFER Interrupt Service Routine ...

Page 36: ...Return f rom interrupt Figure 15 CMX649_TRANSFER Interrupt Service Routine continued 6 Circuit Schematics and Board Layout The schematics and board layout files for this project were created using P CAD These files are available for download from the CML website at www cmlmicro com products applications 649 The size of the board containing this design is 2 5 x 3 3 cm 1 0 x 1 3in This small size is...

Page 37: ...CMX649 Wireless Voice Link Design Guide 2004 CML Microcircuits Page 37 of 42 5 VOUT 4 BP 3 SHDN 1 VIN 2 GND 5 Vout 4 NC 1 Vin 3 SHDN 2 Gnd 2 1 Figure 16 Microcontroller Section ...

Page 38: ...CMX649 Wireless Voice Link Design Guide 2004 CML Microcircuits Page 38 of 42 1 3 2 Figure 17 Voice Codec Section ...

Page 39: ...CMX649 Wireless Voice Link Design Guide 2004 CML Microcircuits Page 39 of 42 Figure 18 RF Transceiver Section ...

Page 40: ...CMX649 Wireless Voice Link Design Guide 2004 CML Microcircuits Page 40 of 42 7 Bill of Materials The following table lists the materials used in this design Table 9 Bill of Materials ...

Page 41: ...ng of all circuit parameters is not necessarily performed www cmlmicro com For FAQs see http www cmlmicro com products faqs index htm For a full data sheet listing see http www cmlmicro com products datasheets download htm For detailed application notes http www cmlmicro com products applications index htm Oval Park Langford Maldon Essex CM9 6WG England Tel 44 0 1621 875500 Fax 44 0 1621 875600 Sa...

Page 42: ...CMX649 Wireless Voice Link Design Guide 2004 CML Microcircuits Page 42 of 42 ...

Reviews: