CML Microcircuits COMMUNICATION SEMICONDUCTORS UM8780/3 November 2003 DE8781/DE8782 User Manual Advance Information Features • CMX878-based modem Reference Design • ‘AT’ Command Compatible Firmware • Line Powered • Opto-isolated Serial Port • Transformer-less DAA • Supplied with PCB Layout Data • FCC68 or TBR21 versions • On-board FLASH PIC Microcontroller 1 Brief Description The DE878x Demonstration Board is a reference design and evaluation tool for the CMX878 V.22bis modem plus DAA IC. Transformer-less DAA, line power extraction and ring detection circuits are implemented on-board in accordance with CMX878 data sheet recommendations. An RJ11 line connector is included. The DE8781 is designed for use in U.S. (FCC68) and the DE8782 is designed for use in Europe (TBR21). Additionally, a Flash PIC Microcontroller is included with evaluation firmware. There is an opto-isolated serial link with a 9-pin D-type socket for PC serial communications. The opto-isolators provide a safety barrier between the line side and a PC. ‘AT’ Commands are used to control the demonstration board via a standard terminal emulator program running on a host PC. Although line powered, the board can be re-configured to enable it to be powered locally from a battery or isolated power supply. The PIC can be re-programmed in situ, via connector, J6, which provides the necessary connections to proprietary programming tools (not supplied). 2003 CML Microsystems plc CMX878 Reference Design and Demonstration Board DE8781/DE8782 CONTENTS Section Page 1 Brief Description.................................................................................. 1 2. Preliminary Information ...................................................................... 4 2.1 Laboratory Equipment............................................................ 4 2.2 Handling Precautions ............................................................. 4 2.3 Approvals ................................................................................ 4 3. Quick Start ........................................................................................... 5 3.1 Setting-Up................................................................................ 5 3.2 Adjustments ............................................................................ 5 3.3 Operation................................................................................. 6 4. Signal Lists .......................................................................................... 8 5. Circuit Schematics and Board Layouts............................................ 10 6. Detailed Description .......................................................................... 12 6.1 Hardware Description ........................................................... 12 6.2 Firmware Description............................................................ 13 6.3 Software Description ............................................................ 26 6.4 Additional Information.......................................................... 27 6.5 Example Modem Tests.......................................................... 29 6.6 Troubleshooting ................................................................... 30 7. Performance Specification................................................................ 31 7.1 Electrical Performance.......................................................... 31 Note: This product is in development: Changes and additions will be made to this specification. Items marked TBD or left blank will be included in later issues. Information in this data sheet should not be relied upon for final product design. 2003 CML Microsystems plc 2 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 J5 IBM-PC RS232 Cable DE878x J1 PSTN Simulator Reference Modem Figure 1 Demonstration Setup Diagram 2003 CML Microsystems plc 3 UM8780/3 CMX878 Reference Design and Demonstration Board 2. Preliminary Information 2.1 Laboratory Equipment DE8781/DE8782 The following laboratory equipment is needed to use either of these demonstration kits: PSTN simulator and reference modem. A PC equipped with a serial port running a terminal emulation program, such as Microsoft’s Hyperterminal. 2.2 Handling Precautions Like most demonstration and evaluation kits, this product is designed for use in office and laboratory environments. The following practices will help ensure its proper operation. 2.2.1 Static Protection This product uses low power CMOS circuits which can be damaged by electrostatic discharge. Partially damaged circuits can function erroneously, leading to misleading results. Observe ESD precautions at all times when handling this product. 2.2.2 Contents - Unpacking Please ensure that you have received all of the items on the separate information sheet (EK8780) and notify CML within 7 working days if the delivery is incomplete. 2.3 Approvals The DE8781 is designed to meet FCC68 telecom approval requirements and the DE8782 is designed to meet TBR21 telecom approval requirements. Users are advised to observe local statutory requirements which may apply to this product before direct or indirect connection to any public telecommunication system. 2003 CML Microsystems plc 4 UM8780/3 CMX878 Reference Design and Demonstration Board 3. DE8781/DE8782 Quick Start This section provides instructions for users who wish to experiment immediately with the demonstration kit. A fuller description of the kit and its use appears later in this document. 3.1 Setting-Up • Ensure jumpers are in the correct position for line powered operation:- Jumper JP1 JP2 • • • • • Purpose Select regulator feed Select VDD source # of Pins 3 3 Connected Pins 2 to 3 1 to 2 Open Pins 1 3 Connect J3 pins 15 and 16 with a shorting link (to ensure the DE878x goes into standby mode when a call is cleared). Connect 9-pin D-type connector to PC serial port. Start terminal emulation program and set to 4800 Baud, 8 data bits, no parity, 1 stop bit, RTS/CTS handshake. Connect simulated POTS line to RJ11 connector, J1. The board will momentarily draw current from the line, initialise itself, send a message to the terminal emulation window and power down. WARNING – Ground Connections Care must be taken when using laboratory instruments with the DE878x to ensure that two electrically separate points on the board are not connected to a common point externally. In particular, a short between tip or ring and DVSS or AVSS will alter the AC and DC impedances presented at tip and ring. In the case of the TBR21 version this could lead to permanent damage to the gyrator circuit. The nature of the DE878x line interface and power supply options require that for correct operation the positive supply and board common voltages lie between the tip and ring voltages, so no two of them may be connected to the same point. The exception to this is the RS232 interface, which is optically isolated from the rest of the DE878x circuitry. Recommendation: In the laboratory, use only isolated power supplies with the DE878x to allow the DE878x to electrically ‘float’. This will allow attachment of an oscilloscope ground lead to one DE878x node. If power is to be supplied from a PSTN simulator, ensure that is it not referenced to ground (some exchange ‘batteries’ are connected to ground and provide a -50V supply referenced to ground). If the PSTN simulator has a ground connection, then all laboratory equipment (including oscilloscopes) must be allowed to ‘float’. 3.2 Adjustments If a jumper across connector J3, pins 15 and 16, is fitted (default) then start-up is as described above. If removed, then, after connecting to the line the DE878x will remain powered up but onhook. This is a non-compliant condition as approximately 2.5mA is drawn from the line, but it allows control of the DE878x including CMX878 registers for evaluation purposes. Additionally, with this jumper removed, whenever the DE878x goes on-hook the regulator will remain powered up. 2003 CML Microsystems plc 5 UM8780/3 CMX878 Reference Design and Demonstration Board 3.3 DE8781/DE8782 Operation The DE878x demonstration board allows the user to perform calling, answering and simple data transfer with a suitable simulator or external third party modem (not supplied). Before a call can be established the DE878x must be woken up. The default settings allow the DE878x to be woken up in one of two ways:• After two ringing bursts have been detected, the DE878x will wake up, go off-hook and attempt to establish a V.22bis connection. • Taking DTR from the in-active to active state (if using hyperterminal, from the ‘Call’ menu, a ‘disconnect’, followed by ‘connect’ operation will achieve this) will wake up the DE878x. The board will then be off hook and the serial link to a PC active. When powered-up the DE878x can be controlled by the AT command set described in Section 6.4, from a terminal emulator program on the host PC. An on-board, line-powered PIC µController interprets the AT command set and controls the CMX878 modem IC. A suitable emulator is the ‘HyperTerminal’ program, which operates under Windows 95/98/NT systems. The DE878x AT command set consists of Basic and CML Specific commands. The board has two operating modes: AT Command Mode In this mode the µController firmware is constantly checking to see if the user has typed a valid AT command. When a valid command is received the firmware will execute that command. While the firmware is operating in this mode, the user can instruct it to manually answer a call, originate a call, go on/off hook, read/write to S-registers, issue CML specific AT commands, and perform any number of other AT command functions. The DE878x always starts in AT Command mode after being woken up and when board initialisation is complete. The CML specific AT commands allow the user to directly control the CMX878 device for evaluation purposes. Note, customer modified CMX878 device registers will be overwritten when Dial and Answer AT commands are executed. The Dial and Answer commands will execute the relevant DTMF transmit, call progress tone detection and negotiation (handshaking) firmware routines before a connection to a remote modem/simulator can be established. Negotiation may be aborted by pushing any key. Note, if the S0 register is set to a non-zero value (default is 2) during this operating mode, the CMX878 status register will be polled every 20ms to check for ring detect status. If valid ringing is detected the DE878x will automatically answer a call after n ring cycles, where n is equivalent to the contents of the S0 register. Data Transfer Mode After gaining a connection (i.e. successful negotiation) with a remote modem the DE878x will be operating in data transfer mode. In this mode the board will transmit all the data it receives from the RS232 computer terminal to the remote modem via the 2-wire line. Likewise any data received from the remote modem via the 2-wire line will be sent to RS232 computer terminal. Whilst operating in this mode the data stream from the RS232 computer terminal is monitored for the escape code sequence (+++). If this sequence is encountered during data transfer the 2003 CML Microsystems plc 6 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 firmware will revert to on-line AT command mode. Whilst in on-line, AT command mode, the board to remote modem connection may be aborted by typing ATH0 (instructs modem to go onhook). Alternatively the user can enter relevant AT commands or return to data transfer mode by using the ATO command. Note that if J3 pins 15 to 16 are s/c (default) the DE878x will go to the standby condition after an ATH0 is executed. Loss of carrier from the remote modem will cause the DE878x to hang up and, if J3 pins 15 to 16 are s/c (default), power down. General The modem line speed is lower than the speed of the RS232 interface (RS232 is running at 4800bps) and the DE878x firmware only provides a small amount of data buffering. Therefore to prevent the µController’s data buffer from overflowing the data flow from the RS232 interface to the µController is controlled by the RTS/CTS (Request/Clear to Send) hardware handshake lines. The CMX878 settings used during negotiation and data transfer will be based on the contents of the S-registers when the call was originated or answered. The S-registers are described in Section 6.4. Certain S-register settings (relevant to the CMX878 configuration), modified during on-line AT command mode, will only take effect when a new call is originated or answered. For example, new CMX878 Tx gain settings (S25 register) modified in on-line AT command mode will be ignored until the next call. The DE878x is also pre-programmed to demonstrate other functions, such as Line-In-Use detection, Caller Line Identification, Parallel Phone detection and special functions to facilitate certification to telecommunication standards. Full details of these are provided in the detailed description of Section 6. 2003 CML Microsystems plc 7 UM8780/3 CMX878 Reference Design and Demonstration Board 4. DE8781/DE8782 Signal Lists CONNECTOR PINOUT Connector Ref. Connector Pin No. J1 1, 2 Signal Name Signal Type - - J3 J4 A BI Bi-directional 2-wire line (A=TIP) 4 B BI Bi-directional 2-wire line (B=RING) - - No connection needed 1 VLCL Power 2 AVDD Power 1,2 DVDD Power Expansion header 3 RA0 I/O spare 4 RA1 I/O spare 5 RA2 I/O spare 6 RA3 I/O spare 7 RB1 I/O spare 8 RA4 I/O spare 10 RB2 I/O spare 12 RC1 I/O spare 14 RC0 I/O spare 16 BOOT-PWR input Remain powered after boot-up 9,11,13,15 DVSS Power 1 GPOP1 Output 2 GPOP2 Output 3 GPOP3 Output 4,5 J5 No connection needed 3 5, 6 J2 Description - Local power supply option CMX878 general purpose outputs Not connected 1 DCD Output 9-pin D Type connector – PC DCD 2 TXD Output 9-pin D Type connector – PC TXD 3 RXD Input 9-pin D Type connector – PC RXD 4 DTR Input 9-pin D Type connector – PC DTR 5 HOST-GND Power 9-pin D Type connector – PC GND 6 DSR Output 9-pin D Type connector - PC DSR 7 RTS Input 9-pin D Type connector – PC RTS 8 CTS Output 9-pin D Type connector - PC CTS 9 RI Output 9-pin D Type connector – PC RI 2003 CML Microsystems plc 8 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 CONNECTOR PINOUT Connector Ref. Connector Pin No. Signal Name Signal Type J6 1 MCLR Input PIC MCLR 2 CTSN Input PIC programming data 3 TXD Input PIC programming clock 4 VPP Power PIC programming voltage 5 DVss Power Vss connection Description TEST POINTS Test Point Ref. Default Measurement Description TP1, TP2 0V AVss TP3, TP4 0V AVss JUMPERS Link Ref. JP1 Positions 1-2: local power Description Regulator power source 2-3: line power [default] JP2 1-2: regulator power [default] AVDD power source 2-3: local power JP4 1-2: Not used Host link operating mode 2-3: Normal [hard-wired] Notes: I/P = O/P = BI = 2003 CML Microsystems plc Input Output Bi-directional 9 UM8780/3 CMX878 Reference Design and Demonstration Board 5. DE8781/DE8782 Circuit Schematics and Board Layouts For clarity circuit schematics are available as separate, high resolution, files. J2 J5 J1 D32 D29 D28 VLCL AVSS R62 D26 D30 R60 U5 C16 Q5 C22 + + D1 C12 R26 R19 R20 R13 R14 D2 R28 R59 U3R55 R52 C31 R54 R29 Q6 R16 R17 R25 D8 R23 C15 M2 C3 R21 C11 C17 R66 R6 R7 C18 JP1 R89 R90 X1 M1A U1 M1 R5A R1 R5 R86 R10 R9 R4 R3 R11 Q2 Q1 JP2 Q3 R33 D6 D5 C9 D7 R72 R77 R73 U2 R74 R96 R71 R79 R70 R88 R87 R80 R94 C33 D20 R78 R91 R95 R30 C21 C2 C1 R4A Q1A C8 C13 R64 R65 C10 R22 R24 C14 R8 R93 R97 X2 C27 C28 R92 R85 R84 SW1 DVSS R61 WAKE R76 R75 D31 R15 SW2 C32 M11 R18 C23 TP6 R63 JP4 C19 Q4 J4 R57 D23 C20 U4 R27 E1 F1 D27 D24 R56 Board Mod 1 2 3 4 A V S S TP5 R34 RESET R51 R69 R81 R68 R82 R67 R83 J3 U6 J6 Figure 2a Top PCB Layout 2003 CML Microsystems plc 10 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 Figure 2b Bottom PCB Layout 2003 CML Microsystems plc 11 UM8780/3 CMX878 Reference Design and Demonstration Board 6. Detailed Description 6.1 Hardware Description DE8781/DE8782 The DAA, power supply and ring detect circuitry on the DE878x board is based on that described in the CMX878 datasheet. Most of the discrete semiconductors called from the CMX878 datasheet have been replaced with SMT equivalents. The DE8781 board is supplied with components fitted for North American use and the DE8782 board is supplied with components fitted for European use. 6.1.1 Power supply options and Operating Voltage Jumpers JP1 and JP2 select the power supply options for the DE878x. This table summarises the options:JP1 2->3 1->2 1->2 JP2 1->2 1->2 2->3 Power Source Line VLCL VLCL AVDD 3.3Volts 3.3Volts 2.7 -> 5.5 Volts Comments Default, VLCL not connected VLCL = 9Volts nominal VLCL = AVDD = 5.5Volts max. Any power supply connected to VLCL should be isolated. Most laboratory power supplies or ‘power bricks’ are suitable. A 9Volt battery is an alternative option. Whenever the CMX878 is placed in standby mode the main regulator is disabled. This removes power from most of the CMX878 and all external circuitry including the µController. Only an inactive to active transition at DTRN or two ringing bursts (default configuration) will bring the CMX878 out of standby and hence restore power to the µController. It is the task of the µController start-up code to establish what is happening and act accordingly. A shorting link across connector J3, pins 15 and 16, (default) ensures that the DE878x goes into standby mode when a call is cleared. Removing the link allows the DE878x to remain operating, in AT command mode, when there is not a call in progress. Users should note that this is an engineering mode which is not compliant with network connectivity standards such as FCC part 68 and TBR21. 6.1.2 ADC input and line voltage monitoring The CMX878 device and reference circuit, see CMX878 datasheet for details, provides a method to determine the dc voltage on the telephone line. The DE878x hardware differs from the CMX878 datasheet in that separate transistors are used to enable the ADC input path and the regulator. This is necessary in order to provide the power supply options detailed above. The reference designators for the extra components are suffixed with a letter A. 6.1.3 Opto-couplers power supply The opto-couplers on the PC side of the RS232 interface are powered by current drawn from the pins of the RS232 interface. DVDD provides power to the opto-couplers on the side of the µController. 6.1.4 Expansion 6.2 Connector J3, pins 1 to 14 are provided for user expansion. Un-used I/O lines of the µController, DVDD and DVSS are taken to this header. The total external load on DVDD should not exceed 7mA. Firmware Description 2003 CML Microsystems plc 12 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 The PIC16LF876-04/SP µController fitted on the DE878x demonstration board has been programmed by CML before shipment with the latest version of firmware. Please read the separate information sheet (EK8780) and check the CML web site for firmware status. The latest source code and programming file (EF8780nn.HEX, where ‘nn’ represents the version number) can be downloaded from the CML web site. The serial communications firmware supplied in the PIC µController assumes the following configuration: 8 data bits, no parity, 1 stop bit and 4,800 baud with hardware flow control. 6.2.1 Start up The flow chart on the next page shows the main tasks of program execution from start-up. If the jumper between connector J3 pins 15 and 16 is removed, the message EF8781 Vn.n or EF8782 Vn.n, will be displayed in the terminal emulator window when these tasks have been completed. 6.2.2 Operation The DE878x firmware only supports DTMF dialling. AT command echoing is an option available in the firmware and involves echoing the received characters sent by the PC. The firmware also provides the option of sending result codes to the PC. These responses can be in either an alpha or numeric form. The AT command set for the DE878x is tabulated in the following pages. These commands can be entered on a PC running Windows terminal emulator software, such as the ‘HyperTerminal’ program supplied with Windows 95/98/NT systems. The ‘HyperTerminal’ Send Text File facility is useful for data transfer i.e. when the DE878x has established a connection with a remote modem. This terminal emulator facility can also be used for sending AT command scripts to the DE878x. These scripts should consist of a single line multiple AT command, for example. ATH1@RE0=4929@RE6?@RE1=4567<CR> 6.2.3 Caller ID If register S15, bit 0 is set, a basic caller ID recovery function is enabled. It is limited to caller ID messages that are present between the first and second ring bursts of an incoming call alert, as is the case in the U.S. or ETSI 300-659.1 section 6.1.1. The message contents are sent to the host PC across the serial RS232 connection. A number of caller ID options are available by writing to register S15 with: • Bit 1 = ‘1’, V.23 FSK is assumed to be received or Bit 1 = ‘0’, Bell 202 FSK is assumed to be received. • Bit 2 = ‘1’, the message is sent to the PC unedited or Bit 2 = ‘0’, the message’s header and length bytes are omitted and carriage returns are inserted between parameters, if multi data message format (MDMF) messages are received. • Bit 3 = ‘1’, the CMX878 will automatically answer an incoming call if the received caller ID message contains a calling line identity parameter which matches the stored number. The stored number can be entered using the AT@A command, see section “CML Specific DE878x AT Commands”. This function will only work when MDMF caller ID messages are received. 2003 CML Microsystems plc 13 UM8780/3 CMX878 Reference Design and Demonstration Board 6.2.4 DE8781/DE8782 Line in Use and Parallel phone detect If register S14, bit 6 is set, then, the CMX878 ADC function is used to monitor the line’s DC voltage. If this voltage drops suddenly during dialling, handshaking or data transfer, it is assumed to be due to another extension requiring the phone line. This will cause the CMX878 to go on hook, the firmware will send the NO CARRIER result code to the PC and if connector J3, pins 15 and 16 are shorted (default), power down. The firmware also checks the line’s DC voltage before originating a call, if it is low it is assumed the line is in use and the call attempt is aborted and the BUSY result code is sent to the PC. 6.2.5 CMX878 Supplementary Standby Register This register inside the CMX878 is used to maintain status information relating to the current operating mode of the DE878x. The information is used if the DE878x is recovering from a break in line power. In normal operation the contents of the register are periodically updated. 6.2.6 Standards Testing During standards testing it is necessary to transmit constant signals such as DTMF digits and sequences of bytes. The way to do this is to use the CML specific AT commands: • • • AT@D - Transmits DTMF tones AT@FB - Transmits random bytes in the high band AT@FC - Transmits random bytes in the low band See section “CML Specific DE878x AT Commands” for more detail. 2003 CML Microsystems plc 14 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 Start Initialise Micro core, I/O and 'C-Bus' No CMX878 standby supply register contents VALID? Initialise DE8781 application from defaults. Yes Get previous modem and line status from CMX878 supplementary standby register Check CMX878 event flags and action. No Return to standby mode? Yes Step through main loop tasks i.e. interpret AT commands Return to standby mode? Save status information in CMX878 supplementary standby register. No Go to standby mode Yes End Figure 3 Program Flow 2003 CML Microsystems plc 15 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 Basic DE878x AT Commands Command Description A Answer Command The modem will go off-hook and attempt to establish a connection with a 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. n=3 Selects ITU-T V.23 with Tx 1200bps and Rx 75bps FSK. n=4 Selects ITU-T V.22 at 600bps DPSK. n=5 Selects ITU-T V.21 at 300bps FSK. n=6 Selects Bell 212A at 1200bps DPSK. n=7 Selects Bell 202 with Tx 150bps and Rx 1200bps FSK. n=8 Selects Bell 202 with Tx 1200bps and Rx 150bps FSK. n=9 Selects Bell 103 at 300bps FSK. Dn Dial Command This command directs the modem to go off-hook, dials according to the string entered and attempts to establish a connection with a remote modem. The n represents an ASCII string composed of dial digits and dial modifiers and must not exceed the 15 character buffer limit. The DTMF tone dialling 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). Command 2003 CML Microsystems plc Description 16 UM8780/3 CMX878 Reference Design and Demonstration Board Hn DE8781/DE8782 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 CML Microcircuits sales information. Nn Modulation Fallback Option Syntax: ATNn<CR> Modifier Usage n=0 When originating or answering, modem negotiates only at the specified communications standard (default). n=1 When originating or answering, falls back from V.22bis to V.22 as required. O Return to Data Transfer Mode Used during on-line AT command mode, this command allows the user to return to data transfer mode. Note, this command does not initiate any retrain sequence. Syntax: ATO<CR> Sn? S-Register Read Command for displaying the contents of an S-Register (See S-Register Table). Syntax: ATSn?<CR> Sn=x where n is the S-Register to be interrogated (decimal). Value returned is either in hex (default) or decimal format depending on the setting of Bit 4 in the S14 register. S-Register Write Command for writing to an S-Register (See S-Register Table). Syntax: ATSn=x<CR> where n is the S-Register (decimal) and x is the value to be written (decimal, 0255). 2003 CML Microsystems plc 17 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 Command Description Zn Modem Reset Instructs the modem to reload the factory S-Register settings (See S-Register Table). Syntax: ATZn<CR> Modifier Usage n=0 Restore factory profile 0, clear last number dialled store. CML Specific DE878x AT Commands Command Description “R Manual Retrain Will cause the modem to initiate a retrain to synchronise with the remote modem. For use only during data transfer using V.22bis. Syntax: AT“R<CR> @A Store Caller Line ID Number Allows entry of the number to be used for the calling line ID automatic answer function. The maximum length of the entered number is 20 digits, as per ETSI 300-659.1. Syntax: [email protected]<CR> Modifier Usage nn..n = The string of digits for comparison. @D DTMF Tone Transmit CMX878 will constantly transmit a selected DTMF tone dialling digit. Can only be selected with connector J3, pins 15 and 16, open circuit. Syntax: AT@D<CR>nn..nX Modifier Usage n = 0-9, A, B, C, D, * or # The DTMF tone dialling digit to be transmitted. X = any other key Terminates the function. 2003 CML Microsystems plc 18 UM8780/3 CMX878 Reference Design and Demonstration Board Command @Fn DE8781/DE8782 Description Test Functions Can only be selected with connector J3, pins 15 and 16, open circuit. Syntax: AT@Fn<CR> Modifier Usage n=0 Reserved. n=1 Reserved. n=2 Delay 100ms. n=3 Delay 1s. n=4 Reserved. n=5 Reserved. n=6 CMX878 Monitor Function 1. Continuously reads and displays the contents of the Status register. The update rate is based on the S19 register setting. The function may be aborted by pushing any key. n=7 CMX878 Monitor Function 2. Reads and displays the contents of the Status register when an interrupt occurs. Error message returned after 30 seconds if IRQN does not go low. User must enable IRQN output and set the appropriate IRQ Mask bit before executing this test command. n=8 CMX878 Monitor Function 3. Continuously reads and displays the contents of the Status register followed by the Event register. The update rate is based on the S19 register setting. The function may be aborted by pushing any key. n=9 Returns 8bit value representing the dc voltage at the ADC input to the CMX878. n=A CMX878 Monitor Function 4. Continuously returns 8bit value representing the dc voltage at the ADC input to the CMX878. The update rate is based on the S19 register setting. The function may be aborted by pushing any key. n=B CMX878 Transmit Function 1. Continuously transmits a random sequence of bytes in the high band. S27 and S25 specify the protocol and transmit settings used, respectively. The function my be aborted by pushing any key. n=C CMX878 Transmit Function 2. Continuously transmits a random sequence of bytes in the low band. S27 and S25 specify the protocol and transmit settings used, respectively. The function my be aborted by pushing any key. 2003 CML Microsystems plc 19 UM8780/3 CMX878 Reference Design and Demonstration Board Command @R01 DE8781/DE8782 Description CMX878 Device Reset Sends the General Reset Command to the CMX878 device. Syntax: AT@R01<CR> @Rn? CMX878 Register Read Command for displaying the contents of a CMX878 device register Syntax: AT@Rn?<CR> where n is a valid CMX878 register address (hexadecimal). Value returned is either in hex (default) or decimal format depending on the setting of Bit 4 in the S14 register. @Rn=x CMX878 Register Write Command for writing to a CMX878 device register. Syntax: AT@Rn=x<CR> where n is a valid CMX878 register address (hexadecimal) and x is the value to be written in hex (default) or decimal format depending on the setting of Bit 4 in the S14 register. 8-bit register values should be between 0-FF, whilst 16-bit register values should be between 0-FFFF. S-Registers The following table gives a brief description of the available S-registers and their functions. Register range, units and factory profiles are also listed. These values are stored in non-volatile memory. Reg Range Units Description Factory Profile S0 0-255 Rings Automatic answer - Number of rings until automatic answer. If the register is zero the modem will not automatically answer. 2 S1 0-255 Rings Count incoming rings - This register is read only and contains the number of rings detected by the modem. 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 2003 CML Microsystems plc 20 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 Reg Range Units Description Factory Profile S3 0-127 ASCII Decimal Carriage return character - Contains the ASCII decimal value of the character recognised as the command line terminator. This character will also be sent at the end of result codes. 13 S4 0-127 ASCII Decimal Line feed character - Contains the ASCII decimal value of the character recognised by the modem as the line feed. The modem sends the line feed character after a carriage return only when word responses are sent. 10 S5 0-127 ASCII Decimal Backspace character - Contains the ASCII decimal value of the character recognised as a backspace. 8 S6 2-255 s Wait time for blind dialling - 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 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 S8 0-255 s 2 S9 S10 1-255 1-255 100ms 100ms Pause Time for Comma Dial Modifier Specifies the number of seconds to pause for each comma (,) encountered in a dial string. Reserved 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 the remote modem hanging up. S11 5-25 10ms DTMF tone duration - Defines the duration of DTMF tones for tone dialling. The length of pause between each DTMF tone is the same as this duration time. 10 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 S13 0-255 Decimal Reserved 0 2003 CML Microsystems plc 21 6 7 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 Reg Range Units Description Factory Profile S14 0-255 Decimal 155 S15 0-255 Decimal S16 S17 S18 0-255 0-255 0-255 Decimal Decimal s General options - provides the following functions: Bit 0 – Send state of CMX878 event register on power-up, 1 enabled, 0 disabled. Bit 1 - Echo command character, 0 Disables echoing (ATE0), 1 Enables echoing (ATE1) Bit 2 - Result code display, 0 Send responses, 1 Do not send responses Bit 3 - Word or number responses, 0 Send number responses, 1 Send word responses Bit 4 – Data format for read or write of CMX878 registers and read of S-registers, 0 Decimal, 1 Hex Bit 5 – Reserved. Bit 6 – Drop call on parallel phone detect, 1 enabled, 0 disabled. Bit 7 - Answer/originate operation, 0 Answer (ATA), 1 Originate (ATD) Caller ID Options – provides the following functions: Bit 0 – Caller ID reception, 1 enabled, 0 disabled. Bit 1 – FSK protocol, 1 V.23 FSK, 0 Bell 202 FSK. Bit 2 – Output format, 1 Message header bytes forwarded, 0 Message header bytes not forwarded. Bit 3 – Calling line ID Automatic answer, 1 enabled, 0 disabled. Bit 4,5,6,7 – Reserved. Reserved Reserved General Purpose Timer - Used for various firmware functions. S19 0-255 10ms S20 S21 S22 S23 0-255 0-255 0-255 0-255 Decimal Decimal Decimal Decimal 2003 CML Microsystems plc General Purpose Timer – Used for various firmware functions Reserved Reserved Reserved Bit Mapped register - Provides the following functions: Bit 0, 1, 2, 3, 4, 5 - Reserved Bit 6, 7 - Guard Tones (DPSK/QAM high band operation only), 00 None,11 550Hz, 10 1800Hz 22 0 2 0 30 2 0 193 0 0 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 Reg Range Units Description Factory Profile S24 0-255 Decimal Bit Mapped register - Provides the following functions: Bit 0 - CMX878 Xtal Freq, 0 12.2880MHz, 1 11.0592MHz Bit 1 - CMX878 Tx and Rx Fixed Compromise Equalisers (used during negotiation and data transfer), 0 Enable, 1 Disable Bit 2 - CMX878 Auto Equaliser (DPSK operating modes, always enabled during V22bis QAM operation), 0 Disable, 1 Enable Bit 3, 4, 5, 6, 7 – Reserved 1 S25 0-255 Decimal Bit Mapped register - Provides the following functions: Bit 0, 1, 2 - CMX878 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 Bit 3, 4, 5 - CMX878 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 Bit 6, 7 - CMX878 Tx Start-stop mode (used during data transfer), 00 Odd parity, 01 Even parity, 10 No parity 183 S26 0-255 Decimal Bit Mapped register - Provides the following functions: Bit 0, 1, 2 - CMX878 Rx Gain (used during negotiation, data transfer and Caller Line ID), 111 0dB, 110 -1.5dB, 101 -3.0dB, 100 -4.5dB, 011 -6dB, 010 -7.5dB, 001 -9.0dB, 000 10.5dB Bit 3, 4, 5 - CMX878 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 Bit 6, 7 - CMX878 Rx USART (used during data transfer), 00 2.3% overspeed, 01 1% overspeed, 10 No overspeed 55 2003 CML Microsystems plc 23 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 Reg Range Units Description Factory Profile S27 0-255 Decimal Bit Mapped register - Provides the following functions: Bit 0, 1, 2, 3 - Reserved. Bit 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 S28 S29 0-255 0-255 Decimal Decimal Reserved Reserved 0 0 Modem Result Codes Numeric Response (Decimal) 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 17 2003 CML Microsystems plc Alpha Response OK CONNECT RING NO CARRIER ERROR NO DIAL TONE BUSY CONNECT 2400 CONNECT 1200 CONNECT 600 CONNECT 300 CONNECT 1200/75 CONNECT 75/1200 CONNECT 1200/150 CONNECT 150/1200 NYI RETRAINING 24 (Not Yet Implemented) UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 AT Command Summary 1. The maximum command length is 48 characters, excluding the AT prefix and carriage return. 2. A user defined escape sequence (usually +++) is required to revert the modem from on-line (data transfer mode) to the command mode, to allow the user to issue AT commands to the PIC. 3. Every command except for A/ and the escape sequence must begin with the AT prefix and be entered by pressing a carriage return. 4. When the default command echoing and word result codes are enabled the firmware will send a LF character directly after a CR character to ensure the terminal emulator display is legible. 5. Commands which are not fully implemented will return the result code ‘NYI’ (Not Yet Implemented). 6. Do not send AT commands to the Demonstration board until the previous result code (if enabled) has been received. 2003 CML Microsystems plc 25 UM8780/3 CMX878 Reference Design and Demonstration Board 6.3 Software Description 6.3.1 Terminal Emulator DE8781/DE8782 Users will need to run a suitable terminal emulator on their PC in order to communicate with the PIC µController on the DE878x. ‘HyperTerminal’, which is supplied with the Windows 95/NT installations, is suitable for this purpose. HyperTerminal Setup Emulation VT100 ASCII Character set ASCII Receiving: COM Port Settings: Wrap lines that exceed terminal width. Bits per second Data bits Parity Stop bits Flow Control 6.3.2 4,800 8 None 1 Hardware In-Circuit Programming Connector J6 provides the connections to the PIC µController which are required to reprogram the device. These connections need to be made to 28 pin DIL header, which can be plugged in to a proprietary programming tool such as the Microchip PICStart plus programmer. The pin mapping is as follows. DE878x pin J6 pin 1 J6 pin 2 J6 pin 3 J6 pin 4 J6 pin 5 Program mode signal name (µC normal pin name) MCLR (MCLR) Data (RB7, CTSN) Clock (RB6, TXD) Open circuit i.e. do not connect Vss (Vss) 28 pin DIL (µC) pin no. 1 28 27 N/A 19 Use of this feature is as follows. • Disconnect DE878x from telephone line, RS232 and any power supply at VLCL. • Set jumpers JP1 and JP2 such that the DE878x regulator is not used and AVDD is supplied directly from VLCL i.e:JP1 pins 1 and 2 shorted, pin 3 open. JP2 pin 1 open, pins 2 and 3 shorted. • Connect an external power source set to 5 Volts dc across VLCL and AVSS ( connector, J2 ). • Set programming tool in accordance with manufacturers instructions. • Connect DE878x to programming tool as per above table. • Switch on external 5 Volts power source. • Start programming sequence in accordance with programming tool manufacturers instructions. 2003 CML Microsystems plc 26 UM8780/3 CMX878 Reference Design and Demonstration Board 6.4 Additional Information 6.4.1 AT Command Text Files DE8781/DE8782 To allow evaluation tests to be quickly and easily repeated it may be useful to create text files containing single line multiple AT commands. Commands can be transferred to the PIC µController via the ‘HyperTerminal’ send text file facility. Note, multiple text files may be required to perform a test if any command lines exceed 48 characters. 6.4.2 Sending Text Files using ‘HyperTerminal’ The following is a description of how to send text files to the DE878x using ‘HyperTerminal’. a) Select the Transfer menu b) Select Send Text File c) Select the required file from the Send Text File window 2003 CML Microsystems plc 27 UM8780/3 CMX878 Reference Design and Demonstration Board 6.4.3 DE8781/DE8782 Negotiation and Data Transfer Modem negotiation (handshaking) may be aborted by pushing any key prior to entering data transfer mode. During data transfer mode the user can revert to on-line AT command mode by typing the escape code sequence (+++). The escape code guard time (based on S12) must have expired to successfully access this mode. Whilst in on-line AT command mode the board to remote modem connection may be aborted by typing ATH0 (instructs modem to go on-hook). Alternatively the user can enter relevant AT commands or return to data transfer mode by using the ATO command. The firmware only supports asynchronous data transfer. Receiver USART overspeed settings specified in S-Register, S26, only apply to DPSK/QAM operating modes. Transmitter Guard Tone settings specified in S-Register, S23, only apply to DPSK/QAM answering modes. If the carrier is lost (during data transfer) or negotiation is aborted by the user, the firmware will send the General Reset Command to the CMX878 device. This action will cause the DE878x demonstration board to hang up and power down. The data transfer firmware contains basic retrain code active only when communicating using V.22bis. This process is sometimes performed by modems when signal distortion or line noise is detected which may threaten data integrity. The data transfer firmware can detect when a remote modem initiates a retrain and responds accordingly, returning the RETRAINING result code to the PC. Although the firmware will not automatically initiate a retrain, a manual retrain can be performed by reverting to the on-line AT command mode and entering the AT”R command. If a retrain is successful the CONNECT 2400 result code is returned to the PC and data transfer is resumed, otherwise the NO CARRIER result code is returned and the microcontroller reverts to AT command mode. The receive auto equaliser function can be enabled via the S24 register. This S24 register setting only applies to DPSK modes of operation. The CMX878 firmware for V22bis always enables the receive auto equaliser half way through the negotiation phase. 6.4.4 Example AT Commands for Reference Modem (not supplied) Setup The DE878x should be able to establish and maintain a communications link with any modem designed for use on the PSTN, provided that it supports the appropriate V.xx protocols. The command structure for a chosen reference is likely to be similar, but not identical, to that of the DE878x. Users should consult the modem instructions in order to configure it correctly. As an example these are command strings used for a Hayes Optima 336 Modem. V.22bis Protocol - AT&FB30X1Q0E1V1L0N0W2S37=6S95=42 V.22 Protocol - AT&FB0X1Q0E1V1L0N0W2S37=5S95=42 2003 CML Microsystems plc 28 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 6.5 Example Modem Tests NOTE: The DE878x must be powered-up in order for it to be controlled via the AT command set. An in-active to active transition at DTRN will achieve this. 6.5.1 Set up DE878x to Automatically Answer a V.22 Call from a Remote Modem 1. Select V.22 communication standard (default is V.22bis). Command : ATB1<CR> 2. Select the required Guard Tone setting using the AT&Gn command (default is none). 3. Enable/Disable Fixed Compromise Equalisers by writing to S-Register, S24 (default is enabled). 4. Configure CMX878 Transmitter by writing to S-Register, S25. 5. Configure CMX878 Receiver by writing to S-Register, S26. 6. Set Automatic Answer S-Register (S0) to 2 rings. Command : ATS0=2<CR> 7. Set DE878x on-hook and power down. Command : ATH0<CR> The DE878x will wake up and attempt to establish a V.22 connection when 2 rings (BT or Bell) have been successfully detected. The CONNECT 1200 result code will be returned to the PC if a V.22 connection is successfully established. The NO CARRIER result code will be returned to the PC if the DE878x fails to establish a V.22 connection within the time specified in S-Register, S18. 6.5.2 Set up DE878x to Manually Answer V.23 Call from a Remote Modem 1. Select V.23 communication standard (default is V.22bis). Command : ATB2<CR> 2. Enable/Disable Fixed Compromise Equalisers by writing to S-Register, S24 (default is enabled). 3. Configure CMX878 Transmitter by writing to S-Register, S25 4. Configure CMX878 Receiver by writing to S-Register, S26. 5. Manually Answer V.23 Call. Command : ATA<CR> The DE878x will attempt to establish a V.23 connection. The CONNECT 1200/75 result code will be returned to the PC if a V.23 connection is successfully established. The NO CARRIER result code will be returned to the PC if the DE878x fails to establish a V.23 connection within the time specified in S-Register, S18. 2003 CML Microsystems plc 29 UM8780/3 CMX878 Reference Design and Demonstration Board 6.5.3 DE8781/DE8782 Set up DE878x to Originate V.22bis Call to a Remote Modem Configure DE878x to dial out using a blind dialling method with DTMF tone duration of 150ms. 1. Select V.22bis communication standard (default is V.22bis). Command : ATB0<CR> 2. Set Wait Time for Blind dialling S-Register (S6) to 5 seconds. Command : ATS6=5<CR> 3. Set DTMF Tone Duration S-Register (S11) to 150ms. Command : ATS11=15<CR> 4. Enable/Disable Fixed Compromise Equalisers by writing to S-Register, S24 (default is enabled). 5. Configure CMX878 Transmitter by writing to S-Register, S25. 6. Configure CMX878 Receiver by writing to S-Register, S26. 7. DTMF Dial (example number 0165447887). Command : ATD0165447887<CR> The DE878x will go off-hook and blind dial after 5 seconds. After dialling the DE878x will attempt to establish a V.22bis connection. The CONNECT 2400 result code will be returned to the PC if a V.22bis connection is successfully established. The NO CARRIER result code will be returned to the PC if the DE878x fails to establish a V.22bis connection within the time specified in S-Register, S7. 6.5.4 Troubleshooting Some terminal emulators have been found not to support full hardware flow control when transferring text files. This could result in data loss when using this facility. If this problem is experienced users should try using a different terminal emulator To ensure successful negotiation and data transfer between the DE878x and third party modems, users should ensure their third party modem is configured to the correct protocol (see third party AT command documentation). Note, any sudden loss of the 2-wire line during data transfer will result in loss of carrier and therefore the demonstration board will hang up and display the NO CARRIER message. However, due to the lost carrier to hang up delay (S10), a short burst of corrupt characters (noise generated) will be observed on the HyperTerminal window before the NO CARRIER message is displayed. These corrupt characters can sometimes match control characters and therefore modify HyperTerminal’s behaviour. The user is advised to restart HyperTerminal if this happens. 2003 CML Microsystems plc 30 UM8780/3 CMX878 Reference Design and Demonstration Board 7. Performance Specification 7.1 Electrical Performance DE8781/DE8782 7.1.1 Absolute Maximum Ratings Exceeding these maximum ratings can result in damage to the Evaluation Kit. Supply (VTIP – VRING) Supply (VLCL – VSS) Supply AVDD (VLCL ) – VSS Voltage on any connector pin to VSS Current into or out of VLCL and VSS pins Current into or out of any other connector pin Storage Temperature Operating Temperature Notes 1 1 2 Min. -300 -0.3 -0.3 -0.3 0 -20 -10 +10 Max. 300.0 300.0 6.2 DVDD + 0.3 +0.5 +20 +70 +35 Units V V V V A mA °C °C Max. 52.0 5.5 +35 Units V V °C 7.1.2 Operating Limits Correct operation of the Evaluation Kit outside these limits is not implied. Supply (VLCL - VSS) Supply AVDD (VLCL ) – VSS Operating Temperature Notes 1 1 Min. 6.0 2.7 +10 Notes: 1. Dependant on jumper selection, VLCL feeds the DE878x regulator or VLCL = AVDD . There are different maximum and operating limits for each case. 2. Not included line connection, J1. 7.1.3 Operating Characteristics Details in this section represent design target values and are not currently guaranteed. For the following conditions unless otherwise specified: Evaluation Device Xtal Frequency = 11.0592MHz ±0.01% (100ppm), Tamb = +25°C. Notes DC Parameters IDD (standby) IDD (idle) Notes: 1. 2. 3. 1 1,2 Min. Typ. Max. Units µA mA 7.0 3.0 Current drawn from line or VLCL. CMX878 regulator on, PIC active On-hook, DTRN active. Off-hook the DE878x will draw all the current provided by the loop, i.e. if the loop current is 40mA then IDD will be 40mA. 2003 CML Microsystems plc 31 UM8780/3 CMX878 Reference Design and Demonstration Board DE8781/DE8782 CML does not assume any responsibility for the use of any circuitry described. No IPR or circuit patent licences are implied. CML reserves the right at any time without notice to change the said circuitry and any part of this product specification. Evaluation kits and demonstration boards are supplied for the sole purpose of demonstrating the operation of CML products and are supplied without warranty. They are intended for use in a laboratory environment only and are not for re-sale, end-use or incorporation into other equipments. Operation of these kits and boards outside a laboratory environment is not permitted within the European Community. All software/firmware is supplied "as is" and is without warranty. It forms part of the product supplied and is licensed for use only with this product, for the purpose of demonstrating the operation of CML products. Whilst all reasonable efforts are made to ensure that software/firmware contained in this product is virus free, CML accepts no responsibility whatsoever for any contamination which results from using this product and the onus for checking that the software/firmware is virus free is placed on the purchaser of this evaluation kit or development board. www.cmlmicro.com For FAQs see: www.cmlmicro.com/products/faqs/ For a full data sheet listing see: www.cmlmicro.com/products/datasheets/download.htm For detailed application notes: www.cmlmicro.com/products/applications/ Oval Park, Langford, Maldon, Essex, CM9 6WG - England. 4800 Bethania Station Road, Winston-Salem, NC 27105 - USA. No 2 Kallang Pudding Road, #09 to 05/06 Mactech Industrial Building, Singapore 349307 No. 218, Tian Mu Road West, Tower 1, Unit 1008, Shanghai Kerry Everbright City, Zhabei, Shanghai 200070, China. Tel: +44 (0)1621 875500 Tel: +65 6745 0426 Fax: +44 (0)1621 875600 Tel: +1 336 744 5050, 800 638 5577 Fax: +1 336 744 5054 Fax: +65 6745 2917 Tel: +86 21 6317 4107 +86 21 6317 8916 Fax: +86 21 6317 0243 Sales: [email protected] Sales: [email protected] Sales: [email protected] Sales: [email protected] Technical Support: [email protected] Technical Support: [email protected] Technical Support: [email protected] Technical Support: [email protected]