COMMUNICATION ICs
Application Note
V.22 Call Setup with the
CMX867
¤
¤¤
¤2001 MX-COM, Inc. www.mxcom.com tel: 800 638 5577 336 744 5050 fax: 336 744 5054 Doc. # 20830147.001
4800 Bethania Station Road, Winston-Salem , NC 27105-1201 USA All Trademarks and service marks are held by their res pec t ive companies.
V.22 Call Setup with the CMX867
This document provides details on the V.22 wireline communications protocol and pointers on how the
handshaking sequence can be achieved with the CMX867 modem IC. Also included is additional information
on the V.14 and V.25 protocols. This document should be used in conjunction with the CMX867 data bulletin.
Detect Unscrambled
ONES in 155±10ms Wait 456±10ms
Scrambled ONES in low band Data
Calling modem
Connect to
line & dial
Wait 765±10ms
Detect
scrambled
ONES in high
band for
270±40ms
75±20ms
Unscrambled ONES in high band
Wait 765±10ms
Scrambled ONES in high band Data
2150
±350ms
Answering modem
Connect to
line after ring
validation
Detect
scrambled
ONES in low
band for
270±40ms
3300ms
±700ms
1800Hz Guard Tone*
Silence Answertone
2100Hz
Fig. 1. V.22 Connect Handshake.
* Guard tones are country dependent
1 V.22 Handshake
Figure 1 above is an adaptation of the V.22 Connect Handshake from Volume VIII - Fascicle VIII.1 of the
Blue Book series published by the ITU (formerly CCITT) November 1988. The actions taken by the
calling and answering modems are illustrated with flow charts and ‘C-BUS’ command strings for
implementation on the CMX867 – see Figures 2 and 3.
1.1 Points to note
The modem can connect to the line by setting the /RDRV output (CMX867 pin 3) to Vss in order to
drive a relay or semiconductor switch. The on-hook level of /RDRV must be Vdd; otherwise
spurious line seizures could occur on initial power up or reset.
Dial tone will be present typically 300ms after going off-hook. If dialing without dial tone detection
then a pause of at least 2.7s (max. 8s) should be introduced before dialing commences. If no dial
tone is detected within 5 seconds of going off-hook then the modem should return on-hook.
DTMF digits should be typically 100ms long with 100ms silence gaps in between.
V.22 Call S etup with the CMX867 2 Application Note
¤
¤¤
¤2001 MX-COM, Inc. www.mxcom.com tel: 800 638 5577 336 744 5050 fax: 336 744 5054 Doc. # 20830147.001
4800 Bethania Station Road, Winston-Salem , NC 27105-1201 USA All Trademarks and service marks are held by their res pec t ive companies.
Figures 2 and 3 are intended to give general guidance on the use of registers. They do not show
software timeout features that avoid lockup on certain loops. The treatment of interrupts (enabling,
servicing & disabling) is not fully shown since these are options that may be implemented for a
particular design. Guard tones are also not included.
On the Public Switched Telephone Network (PSTN), the calling modem should transmit on the low
band and receive in the high band.
Error handling has not been included since this aspect is implementation dependent.
The detection of in-band energy is indicated by b10 of the Status register ($E6). It is advisable to
check this bit in both call setup and data modes where signals are due to be received since it is
possible for noise to occasionally give false indication of bit patterns on a line which does not in fact
have a true signal.
The following bits in the Transmit Mode ($E1) and Receive Mode ($E2) registers need to be set
according to the circuit and function requirement:
Tx Mode b11…b9 = Tx gain
Tx Mode b8,b7 = 550Hz/1800Hz Guard Tone enabling
Tx Mode b4…b0 = USART mode and format
Rx Mode b11…b9 = Rx gain
Rx Mode b5…b0 = USART mode and format
Some points are shown on the drawing in Fig. 1 that relate to circuit switching on the host external
port. For example, the point labeled “Detect 32 consecutive ONES at 2400b/s” is a point at which
the data channel received line signal detector (i.e. Data Carrier Detect pin on RS-232 port, also
referred to as “circuit 109” in the V.22 standard) can be switched.
Register bit states on the flow charts assume a General Reset ($01) has been issued and the
normal start-up procedure has been followed prior to entering the Calling and the Answering
procedures. Each state during these two procedures lists only the register bit changes that are
required to move from the previous state.
1.1.1 For both Calling and Answering modems:
Power up the modem:
Issue a General Reset Command – C-BUS address = $01 (no data)
If the modems need to be set to auto-answer mode:
Write to the General Control ($E0) register:
b6 = 1 (enable /IRQ output)
b5 = 1 (unmask ring detect IRQ)
The modem is now in powersave mode, but programmed to interrupt the controlling microcontroller
when ringing is detected.
1.1.2 For the Calling modem when ready to dial out:
Take the modem out of powersave mode:
Write to the General Control ($E0) register:
b8, b7 = 11 (power up and reset registers)
Wait 20ms
Write to General Control ($E0) register:
b7 = 0 (remove reset condition)
Proceed as shown in the flow charts for Calling Modem
V.22 Call S etup with the CMX867 3 Application Note
¤
¤¤
¤2001 MX-COM, Inc. www.mxcom.com tel: 800 638 5577 336 744 5050 fax: 336 744 5054 Doc. # 20830147.001
4800 Bethania Station Road, Winston-Salem , NC 27105-1201 USA All Trademarks and service marks are held by their res pec t ive companies.
1.1.3 For the Auto-Answering Modem when ring interrupt is serviced:
Maintain the CMX867 in powersave mode but monitor the Status register ($E6) to check the ring
detect on/off timing. When valid ringing has been received, proceed as shown in the flow charts for
Answering Modem.
2 V.25 and V.14 Implementation on the CMX867
V.25 timing has been included within figures 2 and 3. The only point not covered is the optional
transmission of 1300Hz by the calling modem in the period after dialing and before Answer tone
recognition. The cadence is 0.6s ON, 1.75s OFF (typ.). For V.22 this tone is NOT permitted, but the
following details are included for other applications:
TX Mode ($E1) register:
b15..b12 = 0001 (select DTMF / Tones)
b3..b0 = 1001 (1300Hz Calling tone)
The V.25 automatic answering sequence shall be transmitted from the answer mode modem on
international PSTN connections. The transmission of the V.25 sequence may be omitted on point-to-
point leased circuits, or on national connections on the PSTN where permitted by the administration.
V.14 specifies stop bit omission / recovery where DTE data speed is different from modem speed and
specifies two difference ranges, +1% to –2.5% (basic) and +2.3% to –2.5% (extended). The CMX867
enables stop bit deletion by providing two Tx Data registers, $E3 for normal transmission and $E4 for
transmission with one stop bit removed from the current format. Consequently, the host can adjust
the removal of stop bits according to V.14 by directing bytes to the appropriate Tx Data register.
At the receiving end the CMX867 can tolerate missing stop bits if set to basic or extended over-speed
mode:
Rx Mode ($E2) register:
b5…b3 = 101 (for basic range)
or b5…b3 = 100 (for extended range)
or b5…b3 = 110 (for over-speed function disabled)
The CMX867 passes only eight bit data over the C-BUS to the host controller. The host controller
must read the Status register ($E6) and check for parity, framing, and overflow errors before
reconstituting the character in its original format for onward transmission to the remote DTE.
V.22 Call S etup with the CMX867 4 Application Note
¤
¤¤
¤2001 MX-COM, Inc. www.mxcom.com tel: 800 638 5577 336 744 5050 fax: 336 744 5054 Doc. # 20830147.001
4800 Bethania Station Road, Winston-Salem , NC 27105-1201 USA All Trademarks and service marks are held by their res pec t ive companies.
Set-up Tx & Rx
Mode Registers
Take Off-Hook
Dial digits to line.
Calling
Modem
Error
40s Timer
expired ?
N
Y
Unscrambled
1 detected for
145ms?
N
Y
Dial tone
detected ?
N
Y
Set-up Registers
Tx Mode ($E1)
b15..b12 = 0001 (select DTMF / Tones mode)
b11..b9 = user defined (Tx level)
Rx Mode ($E2)
b15..b12 = 0001 (select DTMF / Tone mode)
b11..b9 = user defined (Rx level)
Take Off-Hook
General Control ($E0)
b9 = 1 (Relay drive pin pulled to Vss)
b5 = 0 (Mask Ring Detect IRQ)
Note: If blind dialing then wait 3 seconds before jumping
to the section below headed "Dial digits to line (DTMF)".
Start a 5 second timer.
Dial Tone Detect (before 5s timer expires)
At this point only the dial tone (or possibly busy tone) should
be heard, (country dependent).
General Control ($E0)
b2 = 1 (unmasks Call Progress Energy detect IRQ
in Status register ($E6))
On interrupt, monitor Status register b10 for Call
Progress Energy. If CP energy detected within 5
secs, check whether dial tone (continuous CP
energy) or busy tone (interrupted CP energy) is
present.
Dial digits to line (DTMF)
Tone cadence of 100ms on and 100ms off (country
dependent) is suggested.
General Control ($E0)
b2 = 0 (mask Call Progress Energy IRQ)
Tx Mode ($E1)
b4 = 1 (for DTMF generation)
b3..b0 = user defined (digits to be dialed)
Tone OFF b4..b0 = 00000 (select No Tone)
Start 40s timer
Detect Answer Tone (before 40s timer expires)
Rx Mode ($E2)
b2..b0 = 010 (Answertone detect mode)
General Control ($E0)
b1 = 1 (unmask 2100Hz Answertone IRQ)
Status ($E6)
On interrupt, monitor bit 7 for 2100Hz
Answertone.
Wait for Answertone to disappear.
Detect Unscrambled 1s for 145ms
The 2225Hz Answertone detector will also trigger on
unscrambled 1s.
General Control ($E0)
b1 = 0 (mask 2100Hz Answertone IRQ)
b0 = 1(unmask 2225Hz Answertone IRQ)
Status ($E6)
On interrupt, monitor bit 6 for 2225Hz
Answertone which shows that unscrambled 1s
are being received. Check that unscrambled 1s
are received for at least 145ms.
Wait for Answertone
to disappear
Error
CONTINUED
Answertone
detected ?
N
Y
Start 40 second
timer
Start 5s timer
5s timer expired ?
N
Y
Tone ON
V.25
Figure 2
V.22 Call S etup with the CMX867 5 Application Note
¤
¤¤
¤2001 MX-COM, Inc. www.mxcom.com tel: 800 638 5577 336 744 5050 fax: 336 744 5054 Doc. # 20830147.001
4800 Bethania Station Road, Winston-Salem , NC 27105-1201 USA All Trademarks and service marks are held by their res pec t ive companies.
Wait for 456ms
Check Status ($E6) bit 6 to confirm that unscrambled 1s are
still being received.
Transmit Scrambled 1s at 1200b/s
Tx Mode ($E1)
b15..b12 = 1100 (select V.22 low band)
b6,b5 = 11 (scrambler and 64 x 1s detect enabled)
b4,b3 = 11 (select synchronous mode)
b2..b0 = 011 (select continous 1s)
Detect scrambled 1s in high band
Rx Mode ($E2)
b15..b12 = 1101 (select V.22 high band)
b7,b6 = 11 (descrambler and 64x1s detect enabled)
General Control ($E0)
b1 = 1 (unmask scrambled 1s IRQ)
b0 = 0 (mask IRQ)
Note that b0 was enabled earlier for 2225Hz Answertone
IRQ, but is disabled here after selecting V.22 high band because no
interrupt is yet required for Rx Data Overflow or Rx Data Ready.
On interrupt, check Status ($E6)
If b10 = 1 (Rx energy detected)
b8,b7 = 11 (scrambled 1s found)
Transmit Scrambled
1s at 1200b/s
Calling
Modem
(2)
Unscrambled 1s
still received ?
N
Y
Error
Check scrambled 1s are detected for 270ms (nom.) If not then an
error has occured.
Enable Rx USART
NOTE: The use of the autoequalizer can improve performance.
Rx Mode ($E2)
b8 = user defined (autoequalizer setting)
b5..b3 = user defined (Rx USART mode)
b2..b0 = user defined (data bits and parity
settings)
General Control ($E0)
b0 = 1 (unmask Rx Data overflow and Rx
Data Ready IRQ)
b1 = 0 (mask scrambled 1s detection IRQ)
Load Tx Data register ($E3 or $E4) with first byte
Note: Check that Status ($E6) bit 12 = 1 (Tx Data Ready) before
loading the data.
Wait for 765ms
Start data transmission
Tx Mode ($E1)
b4,b3 = user defined (Tx USART settings)
b2..b0 = user defined (data and stop bit settings)
General Control ($E0)
b3 = 1 (unmask TX Data underflow and Tx
Data Ready IRQ)
Scrambled
1s in high band for
270ms ?
N
Y
Wait 765ms
Start data
transmission
Enable Rx USART
Load first data byte
to be transmitted
Error
Scrambled
1s detected in high
band ?
N
Y
Wait 456ms
V.22 Call S etup with the CMX867 6 Application Note
¤
¤¤
¤2001 MX-COM, Inc. www.mxcom.com tel: 800 638 5577 336 744 5050 fax: 336 744 5054 Doc. # 20830147.001
4800 Bethania Station Road, Winston-Salem , NC 27105-1201 USA All Trademarks and service marks are held by their res pec t ive companies.
Power Up on Ring
qualification
Answering
Modem On Ring Interrupt
A ring interrupt should wake the host controller to perform
a ring qualification routine and power up the CMX867.
Power up
General Control ($E0)
b8 = 1(Device powered normally)
b7 = 1(Reset internal circuitry)
Wait 20ms
Initialize Registers
General Control ($E0)
b7 = 0 (Normal operation)
Tx Mode ($E1)
b15..12 = 0001 (select DTMF/Tones mode)
b11..9 = user defined (Tx level)
Rx Mode ($E2)
b15..12 = 1100 (select V.22 low band)
b11..9 = user defined (Rx level)
b7,b6 = 11 (descrambler enabled)
Take Off-Hook
General Control ($E0)
b9 = 1 (Relay drive pin pulled to Vss)
Wait for 2150ms.
Transmit Answertone
Tx Mode ($E1)
b3..0 = 1010 (2100Hz Answertone)
or b3..0 = 1011 (2225Hz Answertone)
Wait for 3300ms
Turn off Answertone
Tx Mode ($E1)
b3..0 = 0000 (No Tone)
Wait for 75ms
Transmit Unscrambled 1s
Tx Mode ($E1)
b15..12 = 1101 (select V.22 high band)
b8,b7 = user defined (Tx guard tone)
b4,b3 = 11 (select synchronous mode)
b2..b0 = 011 (select continuous 1s)
Detect scrambled 1s
General Control ($E0)
b1 = 1 (unmask scrambled 1s detect IRQ)
On interrupt, check Status ($E6)
If b10 = 1 (Rx energy detected)
b8,b7 = 11 (scrambled 1s found)
Wait 20ms
Take Off-Hook
Wait 3300ms
Wait 2150ms
CONTINUED
Scrambled
1s detected in low
band?
N
Y
Transmit
unscrambled 1s
Transmit
Answertone
Initialize Registers
Turn off Answertone
Wait 75ms
V.25
Figure 3
V.22 Call S etup with the CMX867 7 Application Note
¤
¤¤
¤2001 MX-COM, Inc. www.mxcom.com tel: 800 638 5577 336 744 5050 fax: 336 744 5054 Doc. # 20830147.001
4800 Bethania Station Road, Winston-Salem , NC 27105-1201 USA All Trademarks and service marks are held by their res pec t ive companies.
Check that scrambled 1s are detected for 270ms (nom.)
If not then an error has occured.
Enable Rx USART
NOTE: The use of the autoequalizer can improve performance.
Rx Mode ($E2)
b8 = user defined (autoequalizer setting)
b5..b3 = user defined (Rx USART mode)
b2..b0 = user defined (data bits and parity settings)
General Control ($E0)
b0 = 1 (unmask Rx Data Overflow & Rx Data Ready IRQ)
b1 = 0 (mask scrambled 1s IRQ)
Transmit scrambled 1s (for 765ms)
Tx Mode ($E1)
b6,b5 = 11 (scrambler enabled)
Load Tx Data register ($E3 or $E4) with first byte
Note: Check that Status ($E6) bit 12 = 1 (Tx Data Ready) before
loading the data.
Wait 765ms
Start data transmission
Tx Mode ($E1)
b4,b3 = user defined (Tx USART settings)
b2..b0 = user defined (data and stop bit settings)
General Control ($E0)
b3 = 1(Unmask TX Data Underflow and Tx Data Ready IRQ)
Enable Rx USART
Load Tx buffer with
first data byte
Transmit scrambled
1s
Wait 765ms
Start data
transmision
Answering
Modem
(2)
Scrambled
1s in low band
for 270ms?
N
Y
Error