4 High and 4 Low Comparators
External IRQ Generator
Free Running Operation
x Three 8/10 bit DACs
x Two Variable Attenuators
x Selectable A/D Clock Frequencies
x Full Control via 4-wire Serial Interface
x Low Power 3.0 Operation
RECEIVER
RSSIVSWR
x PCS, Cellular, LMR, Wireless
Transceivers, and General Purpose
x Monitor and Control:
RSSI, Battery State, Temperature,
VSWR, and Error Voltages
x Digital Trim and Calibration:
VCOs, TCXO, Power Output, Bias,
Current, IF Gain, Deviation,
Modulation Depth, and Baseband
Gain
RF TRANSMITTER
RADIO
BATTERY
SYSTEM
The MX839 is a low power CMOS µC peripheral device which provides digitally controlled calibration, trimming, and
monitoring functions for PCS, cellular, LMR, wireless transceivers, and general purpose applications.
Featuring a four input intelligent 10 bit A/D monitoring subsystem, an interrupt generator, three 8/10 bit DACs, and two
variable attenuator functions, the MX839 automatically monitors, produces, and trims up to nine analog signals via a
simple four wire serial control bus. The free running A/D intelligent monitoring subsystem includes independent high and
low limit comparators for each of four analog input signals which can be configured to generate external µC interrupts.
The MX839’s high level of integration reduces end product parts count, component size, and software complexity. MX839
digital trimming functions also reduce manufacturing costs by eliminating manual trimming operations.
Featuring an operating range of 3.0V to 5.5V the MX839 is available in 24-pin SSOP (MX839DS), 24-pin SOIC
(MX839DW), and 24-pin PDIP (MX839P) packages.
BATTERY STATE
TEMPERATURE
µC
C-BUS SERIAL BUS 0 : 3
4 x 10 bit Free Run A/D
4 x Hi Comparator
4 x Low Comparator
IRQ on Compare
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Page 4
Digitally Controlled Analog I/O Processor4MX839 PRELIMINARY INFORMATION
2 Signal List
Pin No.NameTypeDescription
1
XTAL
2XTAL/CLOCKinputThe input to the on-chip oscillator inverter, for external Xtal circuit or clock.
3SERIAL CLOCKinputThe 'C-BUS' serial clock input. This clock, produced by the µC, is used for
4COMMAND DATAinputThe 'C-BUS' serial data input from the µC. Data is loaded into this device in
5REPLY DATAoutputThe 'C-BUS' serial data output to the µC. The transmission of REPLY DATA
6
7
CS
IRQ
8A/DIN1inputAnalog to digital converter input 1 (A/D1)
9A/DIN2inputAnalog to digital converter input 2 (A/D2)
10A/DIN3inputAnalog to digital converter input 3 (A/D3)
11A/DIN4inputAnalog to digital converter input 4 (A/D4)
12V
13V
SS
BIAS
14N/CNo internal connection. Do not make any connection to this pin.
15DACOUT1outputDigital to analog converter No. 1 output (DAC1)
16DACOUT2outputDigital to analog converter No. 2 output (DAC2)
17DACOUT3outputDigital to analog converter No. 3 output (DAC3)
18N/CNo internal connection. Do not make any connection to this pin.
19AV
DD
20MOD1 INinputInput to MOD1 variable attenuator.
21MOD2 INinputInput to MOD2 variable attenuator.
22MOD1outputOutput of MOD1 variable attenuator.
23MOD2outputOutput of MOD2 variable attenuator.
24DV
DD
outputThe output of the on-chip oscillator inverter.
transfer timing of commands and data to and from the device. See Figure 5.
8-bit bytes, MSB (B7) first, and LSB (B0) last, synchronized to the SERIAL
CLOCK. See Figure 5.
bytes is synchronized to the SERIAL CLOCK under the control of the
CS
input.
This tri-state output is held at high impedance when not sending data to the
µC. See Figure 5.
inputThe 'C-BUS' data loading control function. This input is provided by the µC.
Data transfer sequences are initiated, completed or aborted by the
CS signal.
See Figure 5.
outputThis output indicates an interrupt condition to the µC by going to a logic '0'.
This is a 'wire-ORable' output, enabling the connection of up to 8 peripherals
to 1 interrupt port on the µC. This pin has a low impedance pulldown to logic
'0' when active and a high-impedance when inactive. An external pullup
resistor is required.
The conditions that cause interrupts are indicated in the IRQ FLAG register
and are effective if not disabled.
powerNegative supply (ground) for both analog and digital supplies.
outputAn analog bias line for the internal circuitry, held at AVDD/2. This pin must be
bypassed by a capacitor mounted close to the device pins.
powerPositive analog supply. Analog levels and voltages are dependent upon this
supply. This pin should be bypassed to V
by a capacitor.
SS
powerPositive digital supply. Digital levels and voltages are dependent upon this
1. These values should be determined in regard to the amount of supply filtering required for D/A outputs.
2. If an external clock is to be used, then it should be connected to Pin 2 and the components C1, C2, R1, and X1
omitted. The ADC clock frequency is derived from the crystal or external clock by means of internal programmable
dividers. See Section 6 for details of crystal or external clock frequency range.
3. For best results, a crystal oscillator design should drive the clock inverter input with signal levels of at least 40% of
, peak to peak. Tuning fork crystals generally cannot meet this requirement. To obtain crystal oscillator design
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Page 6
Digitally Controlled Analog I/O Processor6MX839 PRELIMINARY INFORMATION
4 General Description
The device comprises four groups of related functions: variable attenuators, digital to analog converters, a multiplexed
analog to digital converter with multiplexer, clock generator and four 8-bit magnitude comparators with variable reference
levels. These functions are all controlled by the 'C-BUS' serial interface and are described below:
4.1 Variable Attenuators
The two variable attenuators have a range of 0 to -12dB and 0 to -6dB respectively and may be controlled independently.
4.2 Digital to Analog Converters
Three DACs are provided with default resolutions of 8 bits, which are defined at the initial chip reset. In this mode the
'C-BUS' data is transferred in a single byte. An option is provided to define any one or more of the DAC resolutions to be
10 bits, then the DAC requires the transfer of two 'C-BUS' data bytes.
The upper and lower DAC reference voltages are defined internally as AV
expressed as:
V
= AVDD x (DATA / 2n) [Volts]
OUT
Where, n is the DAC resolution (8 or 10 bits) and DATA is the decimal value of the input code. For example: n = 8 and
binary code = 11111111 therefore DATA = 255
V
= AVDD x (255 / 256) [Volts]
OUT
Any one of the three DAC input latches might be loaded by sending an address/command byte followed by one or two
data bytes to the 'C-BUS' interface. The data is then latched and the static voltage is updated at the appropriate output.
When a DAC is disabled, its output is defined as open-circuit.
and VSS respectively. The output voltage is
DD
4.3 Analog to Digital Converter and A/D Clock Generator
A single successive approximation A/D is provided with four multiplexed inputs. After a general reset command $01, the
A/D converter subsystem is disabled. To start conversions the Clock Control ($D0) and A/D control ($D7) registers must
be written (refer to Tables 2,6, and 8). Please note that A/D channel 1 must be active for any other channel to work. Also
note that A/D control register bit 5 (
conversions so the data being read does not change during the read which could otherwise result in erroneous data being
read. To re-enable conversions the A/D control register bit 5 (
The internal A/D clock frequency (f
control of this clock signal via the Clock Control Register ($D0), DIVIDER set per Table 6, and the choice of an external
system clock signal or a dedicated crystal. f
Since the typical application is for monitoring slowly changing control voltages, a Sample and Hold circuit is not included
at the input of the A/D. Thus, for the analog to digital conversion to be accurate, the input signal should not change
significantly during the conversion time. For ‘n-bit’ accuracy (with a maximum error of 1LSB) the maximum signal ‘linear
rate of change,’ ‘S,’ is defined by:
where: n is the number of bits of accuracy with a maximum error of 1 LSB
f
where:
A/D_CLK
XTAL
=f
DIVIDER
, DIVIDER is selected per Table 6.
For Example: The most significant bits (n) of accuracy.
For (n = 6) bit accuracy with AV
S = 9.77 [mV/PS]
For (n = 8) bit accuracy with AV
S = 1.95 [mV/PS]
For (n = 10) bit accuracy with AV
S = 0.27 [mV/PS]
The input signal should therefore be band limited to ensure the maximum signal ‘linear rate of change’ is not exceeded for
the desired accuracy.
READ) should be set low prior to issuing a ‘READ A/D DATA x’ command to disable
READ) bit must be set back high.
A/D_CLK
) is generated with a programmable clock generator. Users have flexible
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Page 7
Digitally Controlled Analog I/O Processor7MX839 PRELIMINARY INFORMATION
After enabling conversions the user must allow time for all enabled channels to be digitized before reading the results via
the ‘C-BUS’. The minimum required time to wait is:
CONV_MAX
=T[Seconds]
f
A/D_CLK
Inputs' Enabled of Number' )2+10(
Upon disabling conversions the data for the most recent conversion completed for each channel will be available via the
‘C-BUS’ commands ‘READ A/D DATA x’ (addresses $DC, $DD, $DE, $DF) for input channels 1 through 4 respectively.
Do not forget to re-enable conversions by setting A/D control register bit 5, the READ bit, back high after reading the
desired A/D results. Note that the Magnitude Comparators (see section 4.4) can be configured to monitor the A/D channel
data in order to minimize the software burden of continuously reading the A/D channel data. It is not recommended to
issue ‘READ A/D DATA x’ commands without first setting A/D control register bit 5, the
READbit, low.
An Example C-BUS transaction to do a conversion and read of A/D Channel 1:
HEX
ADDRESS/
COMMAND
$01N/AN/AN/AReset Device
$D0$03N/AN/ASet f
$D7$70N/AN/AEnable conversion on A/D Channel 1
$D7$50N/AN/ADisable conversions after waiting T
$DCN/Axxxxxxxx000000xxRead A/D Channel 1 Data
$D7$70N/AN/ARe-enable conversion on A/D Channel 1
WRITE
DATA
BYTE 1
READ
DATA
BYTE 1
READ
DATA
BYTE 2
A/D_CLK
COMMENT
DIVIDER = 4
CONV_MAX
4.4 Magnitude Comparators and Interrupt Request
High and low digital comparator reference levels are provided for the four digital magnitude comparators via the 'C-BUS'
interface. The digital input to the comparators is provided by the most significant 8 data bits of each A/D channel
When the sampled data falls outside the high or low digital comparator reference levels the status register is updated and
the
pin is pulled low. When a reference level is set to '0', its IRQ is disabled.
IRQ
4.5 Software Description
4.5.1 Address/Commands
Instructions and Data are transferred via the 'C-BUS' in accordance with the timing information provided in Figure 5.
Instruction and data transactions to and from the FX839 consist of an Address/Command byte followed by either:
(i) a control or DAC data write (1 or 2 bytes) or,
(ii) a status or A/D data read (1 or 2 bytes)
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Page 10
Digitally Controlled Analog I/O Processor10MX839 PRELIMINARY INFORMATION
4.7.2 CLOCK CONTROL Register (Hex Address $D0)
This register controls the A/D clock divide ratio:
Bits 7 to 3
DIVIDER
(Bit 2 - Bit 0)
Reserved for future use. These bits should be set to '0'.
The Xtal input clock divide ratio, which sets the A/D sample clock frequency, is defined in the
This is a 16-bit register. Byte (1) is sent first. Bits 0 - 5 of the first byte in this register are used to enable and set the
attenuation of the Modulator 1 amplifier. Bits 0 - 5 of the second byte in this register are used to enable and set the
attenuation of the Modulator 2 amplifier. See Table 7.
543210Mod. 1 Attenuation543210Mod. 2 Attenuation
0XXXXXDisabled (V
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Page 12
Digitally Controlled Analog I/O Processor12MX839 PRELIMINARY INFORMATION
4.7.4 DAC CONTROL Register (Hex address $D3)
This register controls the resolution and the number of enabled DAC outputs:
NBIT DAC1 (Bit 7)
NBIT DAC2 (Bit 6)
These bits define the input resolutions for each of the four DACs. When 'NBIT DAC
resolution of DAC
is 8-Bits. When 'NBIT DACn is '1' the resolution of DACn is 10-Bits.
n
' is '0' the
n
NBIT DAC3 (Bit 5)
(Bit 4)
DAC1 ENABLE (Bit 3)
DAC2 ENABLE (Bit 2)
DAC3 ENABLE (Bit 1)
(Bit 0)
Reserved for future use. This bit should be set to '0'.
These bits allow any one or more of the three DACs to be powered up. When '0' the DAC
powered down and the output is high impedance. When '1' the DAC is powered on and the
output voltage is defined by the DAC Data Registers.
Reserved for future use. This bit should be set to '0'.
is
n
4.7.5 DAC1 DATA Register (Hex Address $D4)
4.7.6 DAC2 DATA Register (Hex Address $D5)
4.7.7 DAC3 DATA Register (Hex Address $D6)
The data in these three registers sets the analog voltage at the output of DAC1, DAC2 and DAC3. This data will consist
of one or two bytes depending on the defined input resolution that is set by bits 7, 6 and 5 of the DAC Control Register.
When operating with 10-bit resolution Bit 7 to Bit 2 of the DAC
DATA Register second data byte must be set to "0".
n
4.7.8 A/D CONTROL Register (Hex Address $D7)
This register sets which channels are active and enables conversion mode or read mode.
(Bit 7)
(Bit 6)
READ
(Bit 5)
Reserved for future use. This bit should be set to '0'.
Reserved for future use. This bit should be set to ‘1’.
When this bit is set to ‘1’ all active channels are continuously sampled and the latest converted
data stored for each channel. When this bit is set to ‘0’ all conversions are stopped so that they
may be read.
A/D1 ACTIVE (Bit 4)
A/D2 ACTIVE (Bit 3)
A/D3 ACTIVE (Bit 2)
These bits allow any one or more of the four A/D input channels to be enabled. When '0' the
A/DIN
input voltage is not converted. When '1' the A/DINn input is defined as active and the
n
input voltage is converted. A/D1 must be active for any other channel to be active.
A/D4 ACTIVE (Bit 1)
(Bit 0)
Reserved for future use. This bit should be set to ‘0’.
Table 8: A/D CONTROL Register (Hex Address $D7)
4.7.9 MAG COMP ONE LEVELS (Hex Address $D8)
4.7.10 MAG COMP TWO LEVELS (Hex Address $D9)
4.7.11 MAG COMP THREE LEVELS (Hex Address $DA)
4.7.12 MAG COMP FOUR LEVELS (Hex Address $DB)
Each address controls the relevant numbered A/D magnitude comparator.
The first byte, transmitted with the most significant bit first, sets the magnitude comparator upper reference level and the
second byte sets the magnitude comparator lower reference level.
When a reference level's value is set to '0' its IRQ is disabled.
In general, if a reference level’s value is R (unsigned decimal value of data byte)
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Volts
Page 13
Digitally Controlled Analog I/O Processor13MX839 PRELIMINARY INFORMATION
4.8 Read Only Register Description
4.8.1 IRQ FLAGS Register (Hex Address $D1)
HIRQF1 (Bit 1)
HIRQF2 (Bit 3)
HIRQF3 (Bit 5)
These bits are set if the relevant digital magnitude comparator input exceeds its upper reference level.
These bits are reset to '0' immediately after reading the IRQ FLAGS register. When any of these bits
are set, an interrupt will be generated if the relevant reference level is not zero.
HIRQF4 (Bit 7)
LIRQF1 (Bit 0)
LIRQF2 (Bit 2)
LIRQF3 (Bit 4)
These bits are set if the relevant digital magnitude comparator input falls below its lower reference
level. These bits are reset to '0' immediately after reading the IRQ FLAGS register. When any of
these bits are set, an interrupt will be generated if the relevant reference level is not zero.
LIRQF4 (Bit 6)
Table 9: IRQ FLAGS Register (Hex Address $D1)
4.8.2 A/D DATA1 Register (Hex Address $DC)
4.8.3 A/D DATA2 Register (Hex Address $DD)
4.8.4 A/D DATA3 Register (Hex Address $DE)
4.8.5 A/D DATA4 Register (Hex Address $DF)
This data will consist of two bytes each. Bit 7 to Bit 2 of the second data byte will be set to '0'. Bits 0-7 of the first byte are
the lease significant 8 bits while Bits 0-1 of the second byte are the most significant 2 bits of the 10 bit conversion.
The analog input (V
) is converted to a 10-bit digital word (w) according to:
IN
V
IN
=w
AV
1024 ×
DD
The bits of word (w) are returned in 2 bytes as follows:
76543210
w
w
w
w
w
w
w
Return Byte 1
Return Byte 2
7
6
5
4
3
2
000000w
1
9
w
0
w
8
5 Application
5.1 C-Bus Clock
Although this is specified as a 500kHz clock for compatibility with other C-BUS devices, the MX839 C-BUS will operate
over a much wider range. Users should ensure that the C-BUS clock is at least 4 times slower than the crystal or external
clock on Pin 2 of the MX839.
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Page 17
Digitally Controlled Analog I/O Processor17MX839 PRELIMINARY INFORMATION
Operating Characteristics Notes:
1. Measured over a 0 to 30kHz Band.
2. The extremes of the DAC output range (when resistively loaded) is affected by the output impedance of the DAC
buffer. Under these conditions, the output impedance can approach 200:. However; when the output is operating
well within the supply; the output impedance will be significantly lower, thereby improving the loaded performance.
3. R
= 5k: AVDD = 5.0V.
LOAD
4. Loads less than 1k: will produce output distortion.
5. Small signal impedance, at AV
= 5V and T
DD
AMB
= 25°C.
6. Differential non-linearity is defined as the difference in width between adjacent code midpoints and the width of an
ideal LSB, divided by the width of an ideal LSB. See Figure 3.
7. Integral non-linearity is defined as the width difference between an actual code midpoint and the line of best fit
through all code midpoints, divided by the width of an ideal LSB. See Figure 4.
8. 6MHz operation at V
= 5.0V only. The ‘C-BUS’ clock must be at lest 4 times slower than the XTAL/CLOCK
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Page 18
Digitally Controlled Analog I/O Processor18MX839 PRELIMINARY INFORMATION
6.1.4 Timing
For the following conditions unless otherwise specified:
DV
= 3.3V to 5.0V, T
DD
AMB
= 25°C
ParameterMin.Typ.M ax.Units
t
CSE
t
CSH
t
HIZ
t
CSOFF
t
NXT
t
CK
CS
SERIAL CLOCK
"CS-Enable to Clock-High"2.0µs
Last "Clock-High to CS-High"4.0µs
"CS-High to Reply Output 3-state"2.0µs
"CS-High" Time between transactions2.0µs
"Inter-Byte" Time4.0µs
"Clock-Cycle" time2.0µs
t
CSOFF
t
CSE
t
NXT
t
NXT
t
CSH
t
CK
COMMAND DATA
7
6
MSB
ADDRESS/COMMAND
REPLY DATA
Logic level is not important
1
3
5
4
BYTE
0
2
LSB
7
5
4
6
FIRST DATA BYTE
7
5
4
6
MSB
FIRST REPLY DATA BYTE
1
3
3
0
2
1
0
2
LSB
7
5
4
6
LAST DA TA BYTE
7
5
4
6
LAST REPLY DATA BYTE
1
3
3
0
2
t
HIZ
1
0
2
Figure 5: 'C-BUS' Timing
Timing Notes:
1. Depending on the command, 1 or 2 bytes of COMMAND DATA are transmitted to the peripheral MSB (Bit 7) first,
LSB (Bit 0) last. REPLY DATA is read from the peripheral MSB (Bit 7) first, LSB (Bit 0) last.
2. Data is clocked into and out of the peripheral on the rising SERIAL CLOCK edge.
3. Loaded commands are acted upon at the end of each command.
4. To allow for differing µC serial interface formats 'C-BUS' compatible ICs are able to work with either polarity
SERIAL CLOCK pulses.