COMMUNICATION SEMICONDUCTORS
APPLICATION NOTE
SOFTWARE & HARDWARE
DESCRIPTION
CMX868 & CMX867
V.22bis/V.22 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Complete CMX868-based V.22bis modem
design
Ultra-low power
RS232 host interface
AT command set
Host µC
Two DAA / line interface variations
‘North American’
European / global
‘Ready’ for CTR21 and FCC Part 68
Modem Design Guide
Reduces development time and risk
Documented C Source code
Supports easy user adaptation for
specific designs
Complete schematics
Bills of Materials
Host µC
CMX868 V.22bis
Modem
RS-232 level shifter
Line State
Detection
Protection
Gyrator
(CTR21 only)
Line
Transformer
Hook
Switch
Polarity Protected
DC Voltage
Regulator
tip
ring
Ring
Isolation
+5V
common
RS-232
port
DAA / line interface
The CMX868 & CMX867 V.22bis/V.22 Modem Design Guide supports rapid development and manufacture of
ultra-low power CMX868-based V.22bis and CMX867-based V.22 modems. This design has been optimized
for a variety of applications including set top boxes, point-of-sale (POS) terminals and security systems.
Providing a full set of modem functions the design guide includes the following: CMX868 2400bps full duplex
V.22bis modem IC, MSP430 low power microcontroller, RS-232 asynchronous serial host interface, AT
command set, FCC and CTR21 telephone line interface (both are provided), DC power supply, and
microcontroller C source code. For applications requiring only 1200bps full duplex V.22 operation a user can
readily adapt the design and use a CMX867 device in place of the provided CMX868.
The design is for realistic wireline applications and the telephone line interface portion of the circuit is
expected to achieve FCC Part 68 and CTR21 approvals when implemented in an appropriate board layout.
(Board layout guidelines are provided.)
These designs were completed in conjunction with International Data Communications (Fremont, CA,
www.idc-us.com).
Software & Hardware Description 2 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Table Of Contents
Section Page
1. Introduction....................................................................................................................3
1.1 Support for CMX868 and CMX867 Devices.........................................................................3
1.2 Support for FCC Part 68 and CTR21 ...................................................................................3
1.3 CMX868 ...............................................................................................................................3
1.4 CMX867 ...............................................................................................................................4
2. Hardware ........................................................................................................................4
2.1 Introduction ..........................................................................................................................4
2.2 Telephone Line State Detection...........................................................................................5
2.2.1 On/Off Hook Detect Operation ................................................................................................5
2.2.2 Intrusion / E911 Detect Operation...........................................................................................5
2.3 Host Processor and CMX868...............................................................................................5
2.4 Line Interface Circuit (DAA)..................................................................................................5
2.4.1 ‘FCC Circuit’ ............................................................................................................................6
2.4.2 ‘CTR21 Circuit’ ........................................................................................................................6
2.4.3 Differences between ‘FCC’ and ‘CTR21’ Circuits ...................................................................6
3. Schematics.....................................................................................................................7
4. BOMs – Bills Of Materials ...........................................................................................11
5. Firmware.......................................................................................................................15
5.1 Compiler Switches..............................................................................................................15
5.2 Firmware Modes.................................................................................................................16
5.3 Interrupts ............................................................................................................................17
5.4 Timers ................................................................................................................................17
5.5 Source Code Functions......................................................................................................17
5.6 Basic AT Commands..........................................................................................................19
5.7 CMX868 Specific AT Commands....................................................................................... 21
5.8 S Registers.........................................................................................................................22
MX-COM, Inc. assumes no responsibility for the use of any circuitry described. No IPR or circuit patent
licenses are implied. MX-COM, Inc. reserves the right to change the said circuitry and this document at any
time and without notice.
Software & Hardware Description 3 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
1. Introduction
This V.22bis modem design guide is based on the CMX868 V.22bis modem IC. It includes an RS232 serial
port host interface and an AT command set for convenient operation in a variety of embedded and
standalone applications.
1.1 Support for CMX868 and CMX867 Devices
The CMX867 and CMX868 are multi-standard modem ICs, identical with the exception that the CMX867 does
not support 2400bps V.22bis signaling. This allows 1200bps V.22 designs to be created using the CMX867
and later upgraded via simple modification to support faster V.22bis signaling using the CMX868, if desired.
This design guide focuses on the CMX868 and includes V.22bis specific firmware for user convenience. If
desired, a user may create a V.22 modem design from this design by replacing the CMX868 with a CMX867
and removing V.22bis specific firmware.
1.2 Support for FCC Part 68 and CTR21
FCC Part 68 and CTR21 are regulatory standards that modem designs must often satisfy. While CTR21
designs generally can satisfy FCC Part 68 requirements they can include components that are not necessary
for FCC-only applications. This design guide includes schematics and bills of materials for both ‘CTR21’ and
‘FCC’ type designs.
Please refer to these regulations for detailed descriptions of their requirements.
1.3 CMX868
Features Applications
V.22bis 2400/2400bps QAM
V.22, Bell 212A 1200/1200 or 600/600bps DPSK
V.23 1200/75, 1200/1200, 75, 1200bps FSK
Bell 202 1200/150, 1200/1200, 150, 1200bps FSK
V.21 or Bell 103 300/300bps FSK
DTMF/Tones Transmit and Receive
Extremely Low Power:
3.5mA/3V, 6.5mA/5V typical
‘Powersave’ Standby Mode
Cable TV Set Top Box (STB)
Telephone Telemetry Systems
Remote Utility Meter Reading
Security Systems
Industrial Control Systems
Electronic Cash Terminals
Pay-Phones
Modem Links with Caller ID
C-BUS
SERIAL
INTERFACE
LINE
CMX868
LINE
INTERFACE HOST
µ C
TX USART & SCRAMBLER.
QAM / DPSK / FSK MODULATOR.
TONE / DTMF GENERATOR.
RX DESCRAMBLER & USART,
QAM / DPSK / FSK RECEIVER.
TONE / DTMF DETECTOR.
RING DETECTOR.
RELAY DRIVER.
The CMX868 is a multi-standard modem for use in telephone based information and telemetry systems.
Control of the device is via a simple high-speed serial bus, compatible with most types of µC serial peripheral
interfaces. The data transmitted and received by the modem is also transferred over the same serial bus.
On-chip programmable Tx and Rx USARTs meeting the requirements of V.14 are provided for use with
asynchronous data and allow unformatted synchronous data to be received or transmitted as 8-bit words.
The CMX868 can transmit and detect standard DTMF and modem calling and answer signals or user-specific
programmed single or dual tone signals. A general purpose Call Progress signal detector is also included.
Software & Hardware Description 4 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Flexible line driver and receive hybrid circuits are integrated on chip, requiring only passive external
components to build a 2 or 4-wire line interface.
The device also features a hook switch relay drive output and a Ring Detector circuit which continues to
function when the device is in Powersave mode, providing an interrupt which can be used to wake up the
host µController when line voltage reversal or ringing is detected.
The CMX868 operates from a single 2.7 to 5.5V supply over a temperature range of -40°C to +85°C and is
available in 24-pin TSSOP, SOIC and DIP packages.
1.4 CMX867
The CMX867 is identical to the CMX868 described in section 1.3, above, with the exception that the CMX867
does not support V.22bis signaling. This makes the CMX867 upward compatible with the CMX868.
2. Hardware
2.1 Introduction
The modem hardware is implemented using an MX-COM CMX868 multi-standard modem chip and a
Texas Instruments MSP430F149 low power microcontroller. Using V.22bis signaling the modem can
communicate at a maximum data rate of 2400 bits per second, full duplex, over a telephone line.
Figure 1, below, shows a block diagram of the circuit. (Note the gyrator circuit is required only for the
‘CTR21’ version.)
Host µC
CMX868 V.22bis
Modem
RS-232 level shifter
Line State
Detection
Protection
Gyrator
(CTR21 only)
Line
Transformer
Hook
Switch
Polarity Protected
DC Voltage
Regulator
tip
ring
Ring
Isolation
+5V
common
RS-232
port
DAA / line interface
Figure 1, Function Block Diagram
Telephone Line State Detection, Host Processor and CMX868 and CTR21 gyrator circuit sections are
described below in more detail.
Software & Hardware Description 5 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
2.2 Telephone Line State Detection
Telephone line state detection indicates whether a phone line is on or off hook. It also resolves when a
parallel telephone extension is taken off hook after the modem has started using the line.
U4 and its external components provide a difference amplifier with a gain of 1/22 with an output DC offset of
1.65V to condition the tip/ring differential voltage to develop the line-in-use signal. This signal is applied to
the MSP430F149 µC ADC input that measures it to resolve the telephone line state.
A full-wave rectifier precedes the differential amplifier and makes all differential tip/ring input voltages positive.
This system resolves differential input voltages over a range of ~5VDC to ~18.5VDC with common mode
voltages of up to ~40V. U4 must be a single supply, low input bias current, opamp.
Note that 22Mohm resistors R10 and R13 provide galvanic isolation between tip/ring and circuit common by
virtue of their very high impedance. Accordingly, layout spacing requirements for ‘network side’ printed circuit
board traces and components must be applied to R10 and R13 and their physical terminals. However, their
‘circuit side’ (not ‘network side’) traces need not maintain ‘network side’ spacing because they are sufficiently
isolated from tip/ring.
2.2.1 On/Off Hook Detect Operation
When the phone is on-hook, the tip/ring voltage magnitude is typically 48VDC. When a parallel phone goes
off-hook this voltage normally drops below 18VDC depending on the connected loop resistance. The modem
will not use the line if it is already being used as indicated by a tip/ring voltage below 18VDC.
Before the modem goes off hook a reading of the line-in-use signal is performed using the MSP 430F149
ADC. If the measured value is greater than 18VDC at tip/ring (greater than 2.47VDC at the input to the ADC)
this indicates the phone line is on hook (available) and the modem takes the line off hook.
2.2.2 Intrusion / E911 Detect Operation
When the modem is using the phone line some applications prefer it go back on hook when an additional
extension is taken off hook. The purpose of this behavior is to release the phone line to allow a person to
take control of the line and place a phone call e.g. to place an emergency 911 call (U.S.).
Taking a parallel extension off hook when the line is being used by the modem causes the tip/ring voltage to
quickly drop ~5% of its prior value. This rapid relative drop is used to resolve when a parallel extension
‘intrusion’ occurs.
The modem’s off hook tip/ring voltage reference is established by reading the line-in-use voltage with the
MSP430F149 ADC, three seconds after the modem goes off hook. Thereafter, line-in-use is measured once
each second. If the voltage drops more than ~5% this indicates a parallel extension has gone off hook so the
modem drops its connection to defer to the parallel extension user.
(Note that intrusion / E911 detect firmware subtracts a constant representing 1.65V from ADC measurements
to correct for the differential amplifier’s +1.65VDC output offset.)
2.3 Host Processor and CMX868
An MSP430F149 microcontroller is used. This device’s features include: integrated Flash (64K), RAM (2K
bytes), six 14-bit ADC inputs, and generous digital I/O. Alternative microcontrollers with similar features are
available and suitable for use with the CMX868.
A distinguishing feature of the MSP430F149 is its low power mode that draws 3µA of supply current when
operating from a 32kHz crystal. This characteristic complements the CMX868’s very low power
requirements.
If desired, the MSP430F149 can act as both the CMX868 host and user application host, typical of embedded
applications. This design includes a serial port interface driver and AT command processing to implement a
‘desktop modem’ application.
Communication between the MSP430F149 and the CMX868 (U5) is via a C-BUS serial chip bus (compatible
with an SPI bus) to reduce signals and simplify host programming.
Header J3 is the JTAG programming port to load the firmware into the MSP430F149 processor for
convenient program development.
2.4 Line Interface Circuit (DAA)
The line side circuit is a direct access arrangement to properly connect the modem to the telephone line.
Components ISO1 and ISO2 provide an isolated ring detect interface and an isolated hook switch.
Software & Hardware Description 6 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Two DAA circuits are provided. One is for ‘FCC’ operation and the other is for ‘CTR21’ operation. While the
‘CTR21 circuit’ is also suited for ‘FCC’ operation, its parts count is higher and so should be used when
CTR21 requirements must be satisfied.
2.4.1 ‘FCC Circuit’
This section refers to Figures 2 & 3, ‘FCC’ Schematics Parts 1 & 2. A Midcom 671-8001 ‘wet’ line
transformer is used in this design. Similar ‘wet’ line transformers with UL 1950 ratings or similar
characteristics may be considered if required for specific applications. Midcom 82111 and
Datatronics LM72019 transformers may be of interest for these types of applications.
2.4.2 ‘CTR21 Circuit’
This section refers Figures 3 & 4, ‘CTR21” Schematics Parts 1 & 2. The gyrator circuit (not required in the
‘FCC circuit’) formed by Q1, R20, R22, R23, R24, C32, and D8 is a DC current sink with a current vs. tip/ring
voltage DC response per CTR21 requirements. R20, R22 and R24 form a bias network for Q1 that adjusts
the bias according to tip/ring voltage, when that voltage is low enough that D8 does not conduct. When the
tip/ring voltage becomes high enough zener diode D8 conducts and clamps to 5.6VDC. This limits the Q1
bias and so limits its collector current so total circuit current is limited to below 60mA per CTR 21.
C32 provides a low pass characteristic in the current vs. tip/ring voltage gyrator response so the gyrator’s
impedance at modem signaling frequencies is sufficiently high and conforms to CTR 21 requirements. This
prevents the gyrator from loading and damping modem signaling voltages/currents.
This gyrator circuit has been successfully applied in multiple designs that are CTR 21 certified. Please refer to
ETSI document TBR 21 January 1998 for additional information on CTR 21 requirements.
2.4.3 Differences between ‘FCC’ and ‘CTR21’ Circuits
The circuitry used in these two circuits is nearly identical; the only differences are due to the presence of the
gyrator circuit in the CTR21 design.
The following components are used in the CTR21 design but have been omitted from the FCC circuit: C27,
C32, R20, R22, R23, R24, Q1, and D8. An additional surge suppressor, RV2, is used in the FCC design but
is omitted from the CTR21 circuit.
With the exceptions of these components, the two circuits are identical.
Software & Hardware Description 7 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
3. Schematics
J2:B
J3:7
J3:5
J3:1
SPICSN
SPIWDATA
SPICLK
RXD
TXD
CTS
DCD
DTR
RI
TXD
DTR
DCD
RXD
RTS
CTS
DSR
1
J2:A
J3:3
VCC
100K
R2
TCLK
GND
GND
GND
X1
32.7688KHz
VCC
GND
1UF
C5
V
CC
SPIRDATA
DSR
RTS
GND
10UF
C13
GND
GND
TP3
1K
R7
1K
R4
VCC
GND
RI
GND
GND
GND
0.1UF
C15
100K
R3
TP1
VCC
1K
R6
1K
R5
TP5
D1
GND
VCC
VCC
SPIIRQ
LINE_IN_USE
J3:11
J1:5
J1:3
J1:7
J1:1
J1:6
J1:9
GND
12
FUSE(R459.250UR)
F1
0.1UF
C11
J3:6
1UF
C6
TP4
VCC
D5
D4
D2
D3
3
2
S1:B
100K
R25
4
1
S1:A
0.1UF
C4
1K
R1
VCC
GND
J1:4
J1:8
J1:2
0.1UF
C9
C8
0.1UF 0.1UF
C2
2-
3
1
+
4
BR1
DF10S
10UF
C14
0.1UF
C7
GND
5
VOUT
4
BYPASS
2GND
1VIN
3SHDN
LP2981AIM
U3
TP2
VCC
0.1UF
C10
C3
0.1UF
10UF
C1
21 R1OUT
13 EN
19 T4IN
24 T1IN
25 C1-
8
R1IN
7
T3OUT
27
V+
16 R1OUTB
18 R3OUT
20 R2OUT
22 T3IN
14 SHDN
17 T5IN
28 C1+
1C2+
3C2-
5
T1OUT
6
T2OUT
4
V-
26
VCC
2
GND
15 MBAUD
23 T2IN
9
R2IN
12
T5OUT
11
R3IN
10
T4OUT
MAX3238ECAI
U1
56 TMS
19 P1.7/TA2
16 P1.4/SMclk
13 P1.1/TA0
60 P6.1/A1
58 RST/NMI
50 P5.6/Aclk
51 P5.7/TBoutH
47 P5.3/Uclk1
48 P5.4/Mclk
44 P5.0/Ste1
45 P5.1/Simo1
8Xin
4P6.5/A5
1DVcc
63
DVss
62
AVss
26
P2.6/Adc12clk
23
P2.3/CA0/Ta1
20
P2.0/Aclk
29
P3.1/Simo0
32
P3.4/Utxd0
35
P3.7/Urxd1
38
P4.2/TB2
41
P4.5/TB5
64
AVcc
53 XT2in
10 VeRef+
57 TCK
55 TDI
7Vref+
11 Vref-/VeRef-
54 TDO/TDI
18 P1.6/TA1
15 P1.3/TA2
12 P1.0/Taclk
17 P1.5/TA0
14 P1.2/TA1
61 P6.2/A2
59 P6.0/A0
49 P5.5/SMclk
46 P5.2/Somi1
52 XT2out
5P6.6/A6
6P6.7/A7
9Xout/Tclk
2P6.3/A3
3P6.4/A4
25
P2.5/Rosc
22
P2.2/CAout/TA0
27
P2.7/TA0
24
P2.4/CA1/TA2
21
P2.1/TAINclk
31
P3.3/Uclk0
30
P3.2/Somi0
28
P3.0/Ste0
33
P3.5/Urxd0
34
P3.6?utxd1
37
P4.1/TB1
36
P4.0/TB0
39
P4.3/TB3
40
P4.4/TB4
43
P4.7/TBclk
42
P4.6/TB6
MSP430F149
U2
Figure 2, 'FCC' Schematic Part 1
Software & Hardware Description 8 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
SPIIRQ
VCC
SPICLK
SPIWDATA
2
SPIRDATA
GND
22PF
C25
SPICSN
TP6
GND
GND
10UF
C19
0.1UF
C18
470
R21
GND
20K
R17
GND
GND
(NOT FITTED)
V
CC
2M
R9
KA
1N5226B
D6
22M
R13
22M
R10
GND
GND
1000PF
C21
22PF
C22
0.1UF
C29
VCC
100PF
C26
330nF
C23
1K
R11
4
3
1
2
PS2801-1
ISO1
K
A
1N5251B
D9
2M
R8
D7
1N4004
1 2
P6KE12A
RV2
0.1UF
C24
1 2
RV1
P3100SA_RP
1000PF
C17
LINE_IN_USE
100K
R16
X2
11.0592MHz
0.1UF
C31
15nF
C28
100K
R19
VCC
470K
R14
VCC
1M
R12
VCC
0.1UF
C12
0.1UF
C20
0.1UF
C16
VCC
2.0mm TO 2.5mm MINIMUM SPACING
AWAY FROM OTHER TRACES
NO GROUND PLANE OR VCC PLANE
UNDER THIS SECTION.
4
1
2
3
J4
TEL_JACK/4
12
F2
FUSE(429.375WR)
100K
R18
1
2
4
3
TRNSFMR_671-8001
T1
GND
10K
R15
1
+
5
V+
4
3
-
2
V-
TLV2211
U4
2-
3
1
+
4
BR2
DF10S
11
RXA
10
RXA
5
RD
16
VDD
13
VBIAS
14
TXA
15
TXA
3
RDRV
9
RXAFB
6
RT
24
VDD
7
VDD
17 VSS
4VSS
20 SERIALCLOCK
2XTAL/CLOCK
21 VSS
12 VSS
8VSS
22 REPLYDATA
23 IRQ
19 COMNDATA
18 CS
1XTAL
CMX868
U5
34
25
16
PS7341-1A
ISO2
Figure 3, 'FCC' Schematic, Part 2
Software & Hardware Description 9 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
--**MX-COM, INC.**--
Title:
Size Date:
CR#
DWG by:
CHK by:
Filename:
MX-COM, INC. Sheet of
MX
2
CMX868 REFERENCE DESIGN BOARD
10/24/01
CMX868_CTR21.sch
???? JCK/RH
BNP
J2:B
J3:7
J3:5
J3:1
SPICSN
SPIWDATA
SPICLK
RXD
TXD
CTS
DCD
DTR
RI
TXD
DTR
DCD
RXD
RTS
CTS
DSR
1
J2:A
J3:3
VCC
100K
R2
TCLK
GND
GND
GND
X1
32.7688KHz
VCC
GND
1UF
C5
VCC
SPIRDATA
DSR
RTS
GND
10UF
C13
GND
GND
TP3
1K
R7
1K
R4
VCC
GND
RI
GND
GND
GND
0.1UF
C15
100K
R3
TP1
VCC
1K
R6
1K
R5
TP5
D1
GND
VCC
VCC
SPIIRQ
LINE_IN_USE
J3:11
J1:5
J1:3
J1:7
J1:1
J1:6
J1:9
GND
12
FUSE(R459.250UR)
F1
0.1UF
C11
J3:6
1UF
C6
TP4
VCC
D5
D4
D2
D3
3
2
S1:B
100K
R25
4
1
S1:A
0.1UF
C4
1K
R1
VCC
GND
J1:4
J1:8
J1:2
0.1UF
C9
C8
0.1UF 0.1UF
C2
2-
3
1
+
4
BR1
DF10S
10UF
C14
0.1UF
C7
GND
5
VOUT
4
BYPASS
2GND
1VIN
3SHDN
LP2981AIM
U3
TP2
VCC
0.1UF
C10
C3
0.1UF
10UF
C1
21 R1OUT
13 EN
19 T4IN
24 T1IN
25 C1-
8
R1IN
7
T3OUT
27
V+
16 R1OUTB
18 R3OUT
20 R2OUT
22 T3IN
14 SHDN
17 T5IN
28 C1+
1C2+
3C2-
5
T1OUT
6
T2OUT
4
V-
26
VCC
2
GND
15 MBAUD
23 T2IN
9
R2IN
12
T5OUT
11
R3IN
10
T4OUT
MAX3238ECAI
U1
56 TMS
19 P1.7/TA2
16 P1.4/SMclk
13 P1.1/TA0
60 P6.1/A1
58 RST/NMI
50 P5.6/Aclk
51 P5.7/TBoutH
47 P5.3/Uclk1
48 P5.4/Mclk
44 P5.0/Ste1
45 P5.1/Simo1
8Xin
4P6.5/A5
1DVcc
63
DVss
62
AVss
26
P2.6/Adc12clk
23
P2.3/CA0/Ta1
20
P2.0/Aclk
29
P3.1/Simo0
32
P3.4/Utxd0
35
P3.7/Urxd1
38
P4.2/TB2
41
P4.5/TB5
64
AVcc
53 XT2in
10 VeRef+
57 TCK
55 TDI
7Vref+
11 Vref-/VeRef-
54 TDO/TDI
18 P1.6/TA1
15 P1.3/TA2
12 P1.0/Taclk
17 P1.5/TA0
14 P1.2/TA1
61 P6.2/A2
59 P6.0/A0
49 P5.5/SMclk
46 P5.2/Somi1
52 XT2out
5P6.6/A6
6P6.7/A7
9Xout/Tclk
2P6.3/A3
3P6.4/A4
25
P2.5/Rosc
22
P2.2/CAout/TA0
27
P2.7/TA0
24
P2.4/CA1/TA2
21
P2.1/TAINclk
31
P3.3/Uclk0
30
P3.2/Somi0
28
P3.0/Ste0
33
P3.5/Urxd0
34
P3.6?utxd1
37
P4.1/TB1
36
P4.0/TB0
39
P4.3/TB3
40
P4.4/TB4
43
P4.7/TBclk
42
P4.6/TB6
MSP430F149
U2
Figure 4, ‘CTR21’ Schematic, Part 1
Software & Hardware Description 10 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
SPIIRQ
VCC
SPICLK
SPIWDATA
2
SPIRDATA
GND
22PF
C25
SPICSN
TP6
GND
GND
10UF
C19
0.1UF
C18
470
R21
GND
20K
R17
GND
GND
(NOT FITTED)
V
CC
2M
R9
KA
1N5226B
D6
22M
R13
22M
R10
1UF
C32
GND
30 Ohm
R23
1
2
3 4
CZT2000
Q1
1000PF
C21
22PF
C22
0.1UF
C29
VCC
100PF
C26
330nF
C23
1K
R11
4
3
1
2
PS2801-1
ISO1
K
A
1N5251B
D9
2M
R8
0.1UF
C24
1 2
RV1
P3100SA_RP
1000PF
C17
GND
LINE_IN_USE
100K
R16
X2
11.0592MHz
0.1UF
C31
3
4
2
5
1
6
SET0902
T1
15nF
C28
100K
R19
VCC
470K
R14
VCC
1M
R12
VCC
0.1UF
C12
0.1UF
C20
0.1UF
C16
VCC
10K
R22
4
1
2
3
J4
TEL_JACK/4
12
F2
FUSE(429.375WR)
100K
R18
10UF/50V
C27
GND
10K
R15
D7
1N4004
1
+
5
V+
4
3
-
2
V-
TLV2211
U4
10K
R24
4.7K
R20
KA
1N5232B
D8
2-
3
1
+
4
BR2
DF10S
11
RXA
10
RXA
5
RD
16
VDD
13
VBIAS
14
TXA
15
TXA
3
RDRV
9
RXAFB
6
RT
24
VDD
7
VDD
17 VSS
4VSS
20 SERIALCLOCK
2XTAL/CLOCK
21 VSS
12 VSS
8VSS
22 REPLYDATA
23 IRQ
19 COMNDATA
18 CS
1XTAL
CMX868
U5
34
25
16
ISO2
PS7341-1A
2.0mm TO 2.5mm MINIMUM SPACING
AWAY FROM OTHER TRACES
NO GROUND PLANE OR VCC PLANE
UNDER THIS SECTION.
Figure 5, ‘CTR21’ Schematic, Part 2
Software & Hardware Description 11 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
4. BOMs – Bills Of Materials
Bills of materials are provided for both the ‘FCC’ and ‘CTR21’ schematics. Section 2.4.1, pg. 6, provides a detailed description of their differences.
Table 1, ‘FCC’ Bill of Materials
Schematic Part Number Location
Component
Name Description Manufacturer Mfg Part Number Qty
BR1, BR2 Various Diode Bridge Single phase, 1A, 1000V
General Semiconductor,
Fairchild Semiconductor, etc. DF10S 2
C2, C3, C4, C7, C8, C9, C10,
C11, C12, C15, C16, C18, C20,
C29 Various Capacitor 0.1uF, 16V, surface-mount Venkel C0603X7R160-104KNE 14
C5, C6 Various Capacitor 1.0uF, 16V Venkel C0603X74160-105KNE 2
C17, C21 Near RJ-11 jack Capacitor Ceramic, 1000pF, 3000V, X7R, 10%, SMD1206 pkg Panasonic-ECG ECK-D3F102KBP 2
C1, C13, C14, C19 Decoupling Capacitor 10uF, 16V Panasonic-ECG ECE-A1CKA100 4
C22, C25 CMX868 xtal circuit Capacitor 22pF, 50V Venkel C0603COG500-220JNE 2
C23 CMX868 RT pin Capacitor 0.33uF, 16V Venkel C0603Y5V160-334ZNE 1
C24 Ring detector input Capacitor 0.1uF, 250V Venkel C1206X7R251-104KNE 1
C26 CMX868 RXA piin Capacitor 100pF, 50V Venkel C0603COG500-101JNE 1
C28 CMX868 TXA pin Capacitor 0.015uF, 16V Venkel C0603X7R160-153KNE 1
D1, D2, D3, D4, D5 Various LED Red Generic Generic 5
D6 Line-in-use circuit Zener diode 3.3V, 0.5W, 5% Microsemi 1N5226B 1
D7 Ring detector input Diode 400V, 1A, rectifier Micro Commercial Co. 1N4004 1
D9 Ring detector input Zener diode 22V, 500mW, 5% Microsemi 1N5251B 1
F1 Power supply Fuse 125V, 0.25A, very fast acting, surface mount Littelfuse R459.250UR 1
F2 RJ-11 connection Fuse 125V, 0.375A, fast blow, surface mount Littelfuse 429.375WR 1
ISO1 Ring detector Optocoupler 2.5kV isolation voltage, single channel NEC PS2801-1 1
ISO2 Hook switch Solid state relay 1 Form A SSR, 3750V isolation NEC, Solid State Optronics PS7341-1A 1
J1 RS-232 circuit Connector Female, DB-9 Generic Generic 1
J2 Power supply Connector Two contact (power and ground) Generic Generic 1
J3
Microcontroller
circuit Connector Programming connector 3M 2514-6002 1
J4
Telephone line
connection
Telephone
Connector
Side entry, 6-4 contacts, unshielded, no panel stops
or flange AMP 555979-1 1
R8, R9 Line-in-use circuit Resistor 2M, 1/16W, 5% Venkel CR0603-16W-205JT 2
R10, R13 Line-in-use circuit Resistor 22M, 1/16W, 5% Generic Through-hole 2
R1, R4, R5, R6, R7, R11 Various Resistor 1k, 1/16W, 5% Venkel CR0603-16W-102JT 6
R12
Output of line-in-use
amplifier Resistor 1M, 1/16W, 5% Venkel CR0603-16W-105JT 1
R14 CMX868 RT pin Resistor 470k, 1/16W, 5% Venkel CR0603-16W-474JT 1
R15 Various Resistor 10k, 1/16W, 5% Venkel CR0603-16W-103JT 1
R2, R3, R16, R18, R19, R25 Various Resistor 100k, 1/16W, 5% Venkel CR0603-16W-104JT 6
R17
CMX868 RD pin
pulldown Resistor 20k, 1/16W, 5% Venkel CR0603-16W-203JT 1
R21
CMX868 TXA
feedback Resistor 470, 1/16W, 5% Venkel CR0603-16W-471JT 1
RV1 RJ-11 connection Protection Diode Sidactor, 275V, surge suppressor Teccor Electronics Inc. P3100SA_RP 1
RV2 Transformer circuit Protection Diode
Transient voltage suppressor, 68V, 600W, uni-
directional Crydom Co. P6KE68A 1
SW1
Microcontroller
circuit Switch DPDT Generic generic 1
Software & Hardware Description 12 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Schematic Part Number Location
Component
Name Description Manufacturer Mfg Part Number Qty
T1 Line interface
Coupling
Transformer
Wet, through hole, impedance ratio 600:470
(primary:secondary) Midcom 671-8001 1
U1 RS-232 circuit
RS-232
transceiver
3.0-5.0V, 5 Tx channels, 3 Rx channels, 10nA,
250kbps Maxim, Texas Instruments MAX3238ECAI 1
U2
Microcontroller
circuit Microcontroller Low power, 2kB RAM, 60kB + 256B FLASH Texas Instruments MSP430F149IPM 1
U3 Power supply circuit Regulator 3.3V CMOS LDO National Semiconductor LP2981AIM5-3.3 1
U4 Line in use circuit Opamp Single channel, rail-to-rail, low voltage, low power Texas Instruments TLV2211 1
U5 Modem circuit Modem CMX868 2400bps modem MX-COM CMX868 1
X1
Microcontroller
circuit Crystal 32.7688kHz Epson C-001R 32.768K-A 1
X2 Modem circuit Crystal
Low profile, Metal Can, Through Hole, 11.0592Mhz,
50ppm tolerance, 50ppm stability, 18pf Load cap Citizen HC49US11.0592MBBJTR 1
Software & Hardware Description 13 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Table 2, ‘CTR21’ Bill of Materials
Schematic Part Number Location
Component
Name Description Manufacturer Mfg Part Number Qty
BR1, BR2 Various Diode Bridge Single phase, 1A, 1000V
General Semiconductor,
Fairchild Semiconductor, etc. DF10S 2
C2, C3, C4, C7, C8, C9, C10,
C11, C12, C15, C16, C18, C20,
C29 Various Capacitor 0.1uF, 16V Venkel C0603X7R160-104KNE 14
C5, C6, C32 Various Capacitor 1.0uF, 16V Venkel C0603X7R160-105KNE 3
C17, C21 Near RJ-11 jack Capacitor Ceramic, 1000pF, 3000V, X7R, 10%, SMD1206 pkg Panasonic-ECG ECK-D3F102KBP 2
C1, C13, C14, C19 Decoupling Capacitor 10uF, 16V Panasonic-ECG ECE-A1CKA100 4
C22, C25 CMX868 xtal circuit Capacitor 22pF, 50V Venkel C0603COG500-220JNE 2
C23 CMX868 RT pin Capacitor 0.33uF, 16V Venkel C0603Y5V160-334ZNE 1
C24 Ring detector input Capacitor 0.1uF, 250V Venkel C1206X7R251-104KNE 1
C26 CMX868 RXA pin Capacitor 100pF, 50V Venkel C0603COG500-101JNE 1
C27 Transformer input Capacitor 10uF, 50V Panasonic-EEU EEU-FC1H100L 1
C28 CMX868 TXA pin Capacitor 0.015uF, 16V Venkel C0603X7R160-153KNE 1
D1, D2, D3, D4, D5 Various LED Red Generic Generic 5
D6 Line-in-use circuit Zener diode 3.3V, 0.5W, 5% Microsemi 1N5226B 1
D7 Ring detector input Diode 400V, 1A, rectifier Micro Commercial Co. 1N4004 1
D8 Line-in-use circuit Zener diode 5.6V, 0.5W, 5% Microsemi 1N5232B-T 1
D9 Ring detector input Zener diode 22V, 500mW, 5% Microsemi 1N5251B 1
F1 Power supply Fuse 125V, 0.25A, very fast acting, surface mount Littelfuse R459.250UR 1
F2 RJ-11 connection Fuse 125V, 0.375A, fast blow, surface mount Littelfuse 429.375WR 1
ISO1 Ring detector Optocoupler 2.5kV isolation voltage, single channel NEC PS2801-1 1
ISO2 Hook switch Solid state relay 1 Form A SSR, 3750V isolation NEC, Solid State Optronics PS7341-1A 1
J1 RS-232 circuit RS-232 Connector Female, DB-9 Generic Generic 1
J2 Power supply Power Connector Two contact (power and ground) Generic Generic 1
J3
Microcontroller
circuit
Programming
Connector Programming connector 3M 2514-6002 1
J4
Telephone line
connection
Telephone
Connector
Side entry, 6-4 contacts, unshielded, no panel stops
or flange AMP 555979-1 1
Q1 Gyrator circuit
Darlington
transistor NPN Darlington, 200V, 600mA, 2W, SOT-223 pkg Central Semiconductor CZT2000 1
R8, R9 Line-in-use circuit Resistor 2M, 1/16W, 5% Venkel CR0603-16W-205JT 2
R10, R13 Line-in-use circuit Resistor 22M, 1/16W, 5% Generic Through-hole 2
R1, R4, R5, R6, R7, R11 Hook switch circuit Resistor 1k, 1/16W, 5% Venkel CR0603-16W-102JT 6
R12 Line-in-use circuit Resistor 1M, 1/16W, 5% Venkel CR0603-16W-105JT 1
R14 CMX868 RT pin Resistor 470k, 1/16W, 5% Venkel CR0603-16W-474JT 1
R15, R22, R24 Ring detector input Resistor 10k, 1/16W, 5% Venkel CR0603-16W-103JT 3
R2, R3, R16, R18, R19, R25 Various Resistor 100k, 1/16W, 5% Venkel CR0603-16W-104JT 6
R17 CMX868 RD pin Resistor 20k, 1/16W, 5% Venkel CR0603-16W-203JT 1
R20 Gyrator circuit Resistor 4.7k, 1/16W, 5% Venkel CR0603-16W-472JT 1
R21 CMX868 TXA pin Resistor 470, 1/16W, 5% Venkel CR0603-16W-471JT 1
R23 Gyrator circuit Resistor 30, 1W, 5% Venkel CR2512-1W-300JT 1
RV1 RJ-11 connection Protection Diode Sidactor, 275V, surge suppresor Teccor Electronics P3100SA_RP 1
SW1
Microcontroller
circuit Switch DPDT Generic generic 1
T1 Line Interface
Coupling
Transformer
Dry, SMT, V.34bis rated, impedance ratio
600:301 (primary:secondary)
Taipei Multipower Electronics
Co. SET0902 1
Software & Hardware Description 14 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.002
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Schematic Part Number Location
Component
Name Description Manufacturer Mfg Part Number Qty
U1 RS-232 circuit
RS-232
transceiver
3.0-5.0V, 5 Tx channels, 3 Rx channels, 10nA,
250kbps Maxim, Texas Instruments MAX3238ECAI 1
U2
Microcontroller
circuit Microcontroller Low power, 2kB RAM, 60kB + 256B FLASH Texas Instruments MSP430F149IPM 1
U3
Power supply
circuit Regulator 3.3V CMOS LDO National Semiconductor LP2981AIM5-3.3 1
U4 Line in use circuit Opamp Single channel, rail-to-rail, low voltage, low power Texas Instruments TLV2211 1
U5 Modem circuit Modem CMX868 2400bps modem MX-COM CMX868 1
X1
Microcontroller
circuit Crystal 32.7688kHz Epson C-001R 32.768K-A 1
X2 Modem circuit Crystal
Low profile, Metal Can, Through Hole, 11.0592Mhz,
50ppm tolerance, 50ppm stability, 18pf Load cap Citizen HC49US11.0592MBBJTR 1
Software & Hardware Description 15 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.001
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
5. Firmware
The firmware is authored in the C programming language using IAR 430 Embedded Workbench Kit V1.24A
under Windows 95/98/NT for the Texas Instruments MSP 430 microcontroller family (PC Host), available from
IAR Systems Software Inc. (www.iar.com).
The use of the C language makes the firmware readable and permits it to be readily ported to other
microcontrollers, if desired.
The firmware provided allocates 1kbytes of RAM to stack space (approximately 25% of which is used),
404 bytes of RAM variable space and 14.1 kbytes of ROM (flash) code space.
Firmware source code will be made available at www.mxcom.com for downloading.
5.1 Compiler Switches
The firmware supports a variety of hardware configurations and firmware features. Compiler switches are
used to conditionally compile needed code. Setting the compiler switches in the header file LwPwr430.h
according to Table 3, below, enables compilation of the code required for this design.
Table 3, Compiler Switches
Features Compiler Switches
Firmware
Switch
Setting
Echo all chars after a <cr> back to same
modem. 80 char buffer. MXCommEcho Off
Sends/Receives chars to/from phone line
to/from an RS232 port. Rs232Comm Yes
Monitors for Line Surrender
A/D active, After off-hook 3 seconds measure
voltage- RefVoltage. Then every 1 second
if( ( (RefVoltage * 0.95) < measured voltage ))
then drop the call
A_DActiveSurrende
r Yes
Monitors for Line Share
A/D active, before going off-hook measure A/D
voltage. If (StartVoltage > 1.5V) then go off-hook
A_DActiveShare Yes
[This code is applicable only if Key Pad is
present]
‘#’ starts phone number, next ‘#’ indicates dial
phone number.
‘*’ indicates start phone number over
KeyPadAttached Off
MSP430 & CMX868
Low Power mode when not in use SleepOk Off
Switch for selectable Rs232 rate 1200/2400
P4.7 BaudSwitch Yes
Software & Hardware Description 16 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.001
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
5.2 Firmware Modes
The modem firmware operates in the modes depicted in Figure 4, below.
Power On
MSP430 powers up and initializes the CMX868 registers and then enters the Wait for Event mode. If Sw1-1 is ON
the modem is set to 1200 baud rate. If Sw-1-1 is OFF the modem is set to 2400 baud rate.
Wait for Event Mode
MSP430 waits for either a Ring Detect from the CMX868 or AT Command input from the RS-232 port. Whichever
event occurs first causes the associated function to be executed.
Modem Baud Rate Mode
In response to either a ring detect from the CMX868 or dialing an outbound call (to connect with another modem) this
mode attempts to negotiate a connection at 2400bps or 1200bps with the remote modem. (If the modem is set to
1200 baud the negotiated baud rate will be similarly 1200.) If the baud rate is successfully negotiated, the MSP430
goes to Transfer Mode. If the baud rate is not successfully negotiated, the MSP430 goes back to Wait for Event
Mode.
Transfer Mode
Data is sent to and from the phone line and the terminal connected at the RS-232 port. A transition to the Wait for
Event Mode occurs when either the phone call is disconnected or a parallel extension is taken off hook. A transition
to AT Command mode occurs when the +++ escape sequence is entered at the RS-232 port and, in this case, a
return to Transfer mode will occur if an ATO command is entered at the RS-232 port.
AT Command Mode
Accept basic AT commands and act on them. After done with AT Command return to Wait for Event Mode. If AT
Command is a dial command first check phone line to determine if it is already in use. If the phone line is not in use
dial call and go to Modem Baud Rate Mode.
Wait for
Event Mode
Power On and initialize
Modem Baud
Rate Mode
AT Command
Mode
Transfer Mode
AT command
entered
Ring Detect
Connection
not successful
Connection
successful
+, +, + escape
sequence entered
ATO command entered
AND
was connected
Phone line
disconnected
OR
other extension
taken off-hook
ATDT command
AND
line not in use
AT command finished
AND
was not connected
Figure 4, Firmware Modes
At any given time the modem is either (1) connected or (2) not connected to a remote modem. DATAXFER is
a variable that indicates this condition (1 = connected to a remote modem). Similarly, at any given time the
modem’s RS232 port is transferring either (1) AT commands and responses or (2) Tx and Rx data over the
phone line. ATCMDMODE is a variable that indicates this condition (1 = AT commands). Table 4, below,
describes the firmware modes and related variables.
Software & Hardware Description 17 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.001
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Table 4, Firmware Modes and Related Variables
Variable Value
ATCMDMODE DATAXFER Current Mode Prior Mode Description
0 0 Modem Baud
Rate
any A call has been initiated or received and the
modem is negotiating a connection with a
remote modem.
0 1 Transfer any Modem is connected to a remote modem and
data is being transferred.
1 0 Wait for Event NOT Transfer
Mode
Mode that awaits either an incoming call or local
entry of an AT command.
1 0 AT Command Wait for Event
Mode
Mode to process an AT command that was
entered when in Wait for Event mode.
1 1 AT Command Transfer Mode Mode to process an AT command that was
entered when in Transfer mode.
5.3 Interrupts
Three µC interrupts are utilized by the firmware. Two, one each for Tx and Rx serial transfers to and from the
CMX868, are produced by the µC’s internal serial port when action is required. For example a serial Rx data
interrupt occurs when data has been received by the µC serial port and requires reading via firmware.
Similarly, a serial Tx data interrupt occurs when the last bit of data is being transmitted out of the µC’s Tx
serial buffer.
The uiTransmitBusy flag, used in the firmware, indicates when the µC transmit serial port is currently
processing data (1 = busy, 0 = idle).
The third interrupt is produced by the µC’s timer and is configured to trigger each 10mS. The associated
timer interrupt service routine decrements any non-zero timer variables until they reach a value of zero.
5.4 Timers
Several firmware operations must be performed according to time schedules. General purpose timer
variables GPT1 and GPT6 are set to non-zero values in firmware. Thereafter they are decremented each
10mS by the timer interrupt routine until they reach a value of zero. This allows code to be conditionally
executed when a timer variable reaches a value of zero.
µC serial port service routines may not use the general purpose timers.
5.5 Source Code Functions
LPMain.c, Rev 1.1
Function main(). Main function for firmware algorithm.
ADCFunction.c, Rev 1.1
Functions for A/D
1. InitADCon() This function initializes the A/D.
2. TurnOffADC( ) This function turns off the A/D.
3. CheckADC( ) When A/D has been initialized; this function determines the current A/D value.
4. DisplayADC( ) For debugging, display ADC values.
Clrlpm3.s43
Function clrlpm3 This function exits low power mode 3.
Clrlpm4.s43
Function clrlpm4 This function exits low power mode 4.
Software & Hardware Description 18 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.001
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
CMX868.c, Rev 1.0
Functions to set up and communicate with the cmx868
1. ShortDelay() Short delay function.
2. InitCmx868andSPI0 () Initialize MSP430 serial port and CMX 868.
3. SleepCMX() MSP430 sets the CMX868 to generate an interrupt on telephone line ring during CMX sleep
mode, and MSP430 sets CMX868 to sleep mode.
4. WakeCMX() MSP430 wake up for CMX868.
5. Read868Status() Reads CMX status register. The result is put in global variables CMXSTAT_HREG,
CMXSTAT_LREG.
6. WriteTx868() Writes byte sent to function to CMX868 transmit register, no return data expected.
7. wr8_cbus () Writes given byte to given CMX868 register.
8. wr16_cbus() Writes given integer to given CMX868 register.
9. rd8_cbus () Reads byte from CMX868 register and returns value.
10. rd16_cbus () Reads integer from CMX868 register and returns value.
11. reset_cbus() Reset and clear CMX868.
12. pwrup() Power up and reset for CMX868.
CMX868Regs.c, Rev 1.0
Function defines global variables used by CMX868.
GenStringsToPC.c, Rev 1.4
Functions for strings to PC, initialize S Register Values and phone off hook function
1. genmsgtopc() Send AT command replies to PC.
2. resmsgtopc() Send modem progress messages to PC.
3. init_sregs() Initialize S Registers to either default 0 or 1 state (see S-Registers section for Values).
4. hook() function for phone line on/off hook.
5. EchoCmdIn () Function to echo back to PC AT command sent.
Hndshake.c, Rev 1.1
Functions to negotiate modem call/baud rates
1. hndshake_init() Initialize CMX868 for handshake negotiations.
2. hndshake_go() Negotiate handshakes.
Keypad.c, Rev 1.0
Functions for Keypad
1. InitKeyPadMonitor() Initialize interrupt for Key ‘#’ pressed.
2. KeyPadScan () Scan for Keys Pressed.
3. KeyPadInput() Determine Key Pressed.
kjh_atcmd.c, Rev 1.1
Functions for AT commands
1. atcmd_interpret() Parse AT command string and process message.
ModemXfer.c, Rev 1.3
Functions for modem interface
1. ModemSending() Transfer data on phone line. Either echo mode or to/from Rs232 for modem interface.
2. hangup() Monitor if the phone line is active. Hang up if phone line is not active.
3. CheckPhoneLineBefore () use A/D values to determine if phone line is already in use.
4. ringdetection() Monitor CMX868 for a telephone line ringing.
5. dial() Dial phone number.
6. BusyTone () Monitor CMX868 to determine if phone line is busy after dial.
7. DialTone () Monitor CMX868 to determine if dial tone is present after phone line goes off hook.
Software & Hardware Description 19 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.001
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
MspInts.c, Rev ‘8/20/01’
Functions for MSP430 interrupt initialization and handling
1. InitForIntrpts() Initialize interrupt global variables.
2. intTxhand() transmit interrupt for data to PC.
3. intRxhand() receive interrupt for data from PC.
4. TIMERA0_Handler() system timer interrupt for monitoring timed events in MSP functions.
5. PORT1_Handler () interrupt for keypad monitoring for initial ‘#’.
SelectBaudRate.c, Rev 1.1
1. SelectBaudRate() determines Baud Rate for PC/Rs232 port.
Timers.c, Rev 1.1
Functions for system timer, for timed events in MSP430
1. InitTimers () Initialize MSP430 timer.
2. StopTimers () Stop MSP430 timer.
3. StartTimers () Start MSP430 timer.
4. DelayMs() function to generate a hard delay (not background delay). Value sent in 10's of milliseconds.
5. Delay1s() function to generate a hard delay(not background delay). Value sent in seconds.
5.6 Basic AT Commands
Comman
d
Description
A Answer Command
The modem will go off-hook, transmit the answer tone, and wait for a carrier from the remote
modem.
Syntax: ATA<CR>
A/ Re-Execute Previous Command Line
Re-executes the last issued command line. This command does not require the AT prefix or a
carriage return.
Syntax: A/
Bn Select Communications Standard
Selects the communications standard specified by the parameter n.
Syntax: ATBn<CR>
Modifier Usage
n=0 Selects ITU-T V.22bis at 2400bps QAM (default).
n=1 Selects ITU-T V.22 at 1200bps DPSK.
n=2 Selects ITU-T V.23 with Tx 75bps and Rx 1200bps FSK. [not tested]
n=9 Selects Bell 103 at 300bps FSK. [not tested]
Dn Dial Command
This command directs the modem to go off-hook, dial according to the string entered and
attempt to establish a connection. The n represents an ASCII string composed of dial digits and
dial modifiers and must not exceed the 23 character buffer limit. The DTMF tone dialing digits
include 0 through 9, A, B, C, D, and the symbols # and *.
For example: ATD9,01621875500<CR>
Modifier Usage
n=L Re-dial last number.
n=, Delay dial sequence (pause setting contained in S-Register S8).
En Echo Command Characters
Syntax: ATEn<CR>
Modifier Usage
n=0 Disables the echoing of commands to the screen.
n=1 Enables echoing of commands to the screen (default).
Software & Hardware Description 20 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.001
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Comman
d
Description
Hn Switch Hook Control
Syntax: ATHn<CR>
Modifier Usage
n=0 Instructs the modem to go on-hook (disconnect).
n=1 Instructs the modem to go off-hook.
In Identification
Requests the modem to return its product identification information.
Syntax: ATIn<CR>
Modifier Usage
n=0 Displays the firmware name and version number.
n=1 Displays Product Name.
n=2 Displays European sales information.
n=3 Displays South East Asia sales information.
n=4 Displays MX-COM sales information.
O Return to On-Line Mode
Syntax: ATO<CR>
Qn Enable/Disable Modem Responses
Syntax: ATQn<CR>
Modifier Usage
n=0 Enables result codes to be issued to the screen (default).
n=1 Disables result codes to be issued to the screen.
Sn? S-Register Read
Command for displaying the contents of an S-Register (See S-Register Table).
Syntax: AT@Sn?<CR>
where n is the S-Register to be interrogated (decimal).
Value returned will be in decimal format (i.e 043).
Sn=x S-Register Write
Command for writing to an S-Register (See S-Register Table).
Syntax: AT@Sn=x<CR>
where n is the S-Register (decimal) and x is the value to be written (decimal, 0-255).
Vn Result Code Format
Syntax: ATVn<CR>
Modifier Usage
n=0 Instructs the modem to display result codes as numbers.
n=1 Instructs the modem to display result codes as words (default).
Xn Calling Characteristics
Determines which set of responses and calling characteristics are used.
Syntax: ATXn<CR>
Modifier Usage
n=0 The modem will ignore dial tones and busy tones. Dial tone wait time is zero, and blind
dialing is enabled. The modem returns a CONNECT result code when a connection is
established.
n=1 The modem will ignore dial tones and busy tones. Dial tone wait time is zero, and blind
dialing is enabled. The modem returns a CONNECT xxxx result code when a connection is
established, where xxxx is the Tx/Rx line speed (default).
n=2 The modem will ignore busy tones, but waits for a dial tone before dialing. If a dial tone is
not detected within 5 seconds, a NO DIAL TONE result code is returned.
The modem returns a CONNECT xxxx result code when a connection is established, where
xxxx is the Tx/Rx line speed.
n=3 The modem will ignore dial tones. If a busy tone is detected, a BUSY result code is
returned. Blind dialing is enabled. The modem returns a CONNECT xxxx result code when a
connection is established, where xxxx is the Tx/Rx line speed.
n=4 If a dial tone is not detected within 5 seconds, a NO DIAL TONE result code is returned. If a
busy tone is detected, a BUSY result code is returned. The modem returns a CONNECT xxxx
result code when a connection is established, where xxxx is the Tx/Rx line speed.
Software & Hardware Description 21 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.001
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Comman
d
Description
Zn Modem Reset
Instructs the µC to reset the CMX868 and then reload the factory
S-Register settings (See S-Register Table).
Syntax: ATZn<CR>
Modifier Usage
n=0 Reset CMX868 device and restore factory profile 0.
n=1 Reset CMX868 device and restore factory profile 1.
&Fn Recall Factory Defaults
Instructs the µC to reload the factory S-Register settings (See S-Register
Table).
Syntax: AT&Fn<CR>
Modifier Usage
n=0 Recalls factory profile 0.
n=1 Recalls factory profile 1.
&Gn Guard Tone Select
Selects the Guard tone to be transmitted with highband QAM or DPSK.
Syntax: AT&Gn<CR>
Modifier Usage
n=0 Disable guard tone (default).
n=1 Select a 550Hz guard tone.
n=2 Select a 1800Hz guard tone.
5.7 CMX868 Specific AT Commands
Comman
d
Description
@RR CMX868 Device Reset
Resets the CMX868 device.
Syntax: AT@RR<CR>
@Rn? CMX868 Register Read
Command for displaying the contents of a CMX868 device register
Syntax: AT@Rn?<CR>
where n is a valid CMX868 register address (hexadecimal).
Value returned is in decimal format (i.e. 02356).
@Rn=x CMX868 Register Write
Command for writing to a CMX868 device register.
Syntax: AT@Rn=x<CR>
where n is a valid CMX868 register address (hexadecimal) and x is the value to be written
(decimal).
8-bit register values should be between 0-255, while 16-bit register values should be between 0-
65535.
Software & Hardware Description 22 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.001
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
5.8 S Registers
S-register factory profiles are shown in the following table.
Reg. Range Units Description Profile ‘0’
(Default)
Profile ‘1’
S0 0-255 Rings Automatic answer - The number of rings
until automatic answer. If the register is set to
zero, modem does not answer.
1 5
S1 0-255 Rings Count incoming rings - This register is read
only and contains the number of rings
detected by the modem.
0 0
S2 0-127 ASCII Decimal
Escape character value - This register
defines an ASCII decimal value of the escape
character. The default setting is an ASCII +
and the escape sequence is +++. A value
over 127 disables the escape sequence.
43 43
S3 0-127 ASCII Decimal
Carriage return character - Contains the
ASCII decimal value of the character
recognized as the command line terminator.
This character will also be sent at the end of
result codes.
13 13
S4 0-127 ASCII Decimal
Linefeed character - Contains the ASCII
decimal value of the character recognized as
a linefeed.
10 10
S5 0-127 ASCII Decimal
Backspace character - Contains the ASCII
decimal value of the character recognized as
a backspace.
8 8
S6 2-255 s Wait time for blind dialing - Sets the length
of time to pause after the modem goes off the
hook before the modem dials the first digit of
the telephone number.
2 2
S7 1-255 s Wait for carrier after dial - Sets the length of
time the modem waits for a carrier before
returning on-hook.
50 50
S8 0-255 s Pause Time for Comma Dial Modifier -
Specifies the number of seconds to pause for
each comma (,) encountered in a dial string.
2 2
S9 1-255 100ms Carrier Detect Response Time – Specifies
the time that a received carried must be
present on the line before the modem
recognizes it as a valid carrier and asserts the
Data Carrier Detect (DCD) signal.
6 6
S10 1-255 100ms Lost carrier to hang up delay - Sets the
length of time that the modem waits before
hanging up after the loss of a carrier. This
allows the modem to distinguish between
disturbances that momentarily break the
connection and when the remote modem
hangs up.
7 7
S11 5-255 10ms DTMF tone duration - Defines the duration of
DTMF tones for tone dialing. The length of
pause between each DTMF tone is the same
as this duration time.
10 20
S12 0-255 50ms Escape code guard time - Specifies the
minimum time before entry of the escape
sequence. This value also dictates the
acceptable entry speed (inter-character time)
for each escape character.
20 20
Software & Hardware Description 23 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.001
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Reg. Range Units Description Profile ‘0’
(Default)
Profile ‘1’
S13 0-255 Decimal Reserved 0 0
S14 0-255 Decimal General options - provides the following
functions:
0 – Reserved
1 - Echo command character
0 Disables echoing (ATE0)
1 Enables echoing (ATE1)
2 - Result code display
0 Send responses (ATQ0)
1 Do not send responses (ATQ1)
3 - Word or number responses
0 Send number responses (ATV0)
1 Send word responses (ATV1)
4,5,6 – Reserved
7 - Answer/originate operation
0 Answer (ATA)
1 Originate (ATD)
138 128
S16 0-255 Decimal Reserved 0 0
S17 0-255 Decimal Reserved 0 0
S18 0-255 s General Purpose Timer - Used for various
firmware functions.
30 30
S19 0-255 Decimal Reserved 0 0
S20 0-255 Decimal Reserved 0 0
S21 0-255 Decimal Reserved 0 0
S22 0-255 Decimal Bit Mapped register - Provides the following
functions:
0,1,2,3,7 – Reserved
6,5,4 - Calling Characteristics
000 (ATX0),100 (ATX1), 101 (ATX2),
110 (ATX3), 111(ATX4)
64 0
S23 0-255 Decimal Bit Mapped register - Provides the following
functions:
0,1,2,3,4,5 – Reserved
6,7 - Guard tones
00 None (AT&G0)
01 550Hz (AT&G1)
10 1800Hz (AT&G2)
0 0
S24 0-255 Decimal Bit Mapped register - Provides the following
functions:
0 - CMX868 Xtal Freq,
0 12.2880MHz,
1 11.0592MHz
1 - CMX868 Tx and Rx Fixed Compromise
Equalizers (used during negotiation and data
transfer),
0 Enable,
1 Disable
2, 3, 4, 5, 6, 7 - Reserved
1 1
Software & Hardware Description 24 of 24 CMX868 & CMX867 Modem Design Guide
2001 MX-COM, Inc. www.mxcom.com Tel: 800 638 5577 336 744 5050 Fax: 336 744 5054 Doc. # 208300157.001
4800 Bethania Station Road, Winston-Salem, NC 27105-1201 USA All trademarks and service marks are held by their respective companies.
Reg. Range Units Description Profile ‘0’
(Default)
Profile ‘1’
S25 0-255 Decimal Bit Mapped register - Provides the following
functions:
0,1,2 - CMX868 Tx Gain (used during
negotiation and data transfer),
111 0dB, 110 -1.5dB, 101 -3.0dB,
100 -4.5dB, 011 -6dB, 010 -7.5dB,
001 -9.0dB, 000 -10.5dB
3,4,5 - CMX868 Tx Data/Stop bits (used
during data transfer)
111 8/2 bits, 110 8/1 bits, 101
7/2 bits, 100 7/1 bits, 011 6/2 bits,
010 6/1 bits, 001 5/2 bits,
000 5/1 bits
6,7 - CMX868 Tx Start-stop mode (used
during data transfer)
00 Odd parity, 01 Even parity,
10 No parity
176 176
S26 0-255 Decimal Bit Mapped register - Provides the following
functions:
0,1,2 - CMX868 Rx Gain (used during
negotiation and data transfer)
111 0dB, 110 -1.5dB, 101 -3.0dB,
100 -4.5dB, 011 -6dB, 010 -7.5dB,
001 -9.0dB, 000 -10.5dB
3,4,5 - CMX868 Rx Data and Parity bits (used
during data transfer)
111 8 data + parity, 110 8 data
101 7 data + parity, 100 7 data
011 6 data + parity, 010 6 data
001 5 data + parity, 000 5 data
6,7 - CMX868 Rx USART (used during data
transfer)
00 2.3% over-speed
01 1% over-speed
10 No over-speed
48 176
S27 0-255 Decimal Bit Mapped register - Provides the following
functions:
0,1,2,3 - Reserved.
4,5,6,7 - Communication Standard
0000 (ATB0), 0001 (ATB1)
0010 (ATB2), 0011 (ATB3)
0100 (ATB4), 0101 (ATB5)
0110 (ATB6), 0111 (ATB7)
1000 (ATB8), 1001 (ATB9)
0 0
S28 0-255 Decimal Reserved 0 0
S29 0-255 Decimal Reserved 0 0
S30 0-255 Decimal Reserved 0 0
S31 0-255 Decimal Reserved 0 0
S32 0-255 Decimal Xon Character. Contains the ASCII decimal
value of the character recognized as Xon.
17 17
S33 0-255 Decimal Xoff Character. Contains the ASCII decimal
value of the character recognized as Xoff.
19 19