SI2457-D-FS Silicon Laboratories Inc, SI2457-D-FS Datasheet - Page 262

no-image

SI2457-D-FS

Manufacturer Part Number
SI2457-D-FS
Description
IC ISOMODEM SYSTEM-SIDE 16SOIC
Manufacturer
Silicon Laboratories Inc
Datasheets

Specifications of SI2457-D-FS

Lead Free Status / Rohs Status
Lead free / RoHS Compliant
AN93
Example Program in C/C++
This program shows how to establish an SDLC V.29 FastPOS link and keep the loop alive.
How to use the program:
This program is meant to run for only a few minutes for testing. It is run after a reset is done, loads a patch from
“patch.txt” and calls using the atdt line it finds in “tel_no.txt”. Both files need to terminate in CR LF.
The tel_no.txt file must contain a complete telephone number dialing line followed by a CR, e.g. ATDT8,5551212.
// V29_test.cpp : Defines the entry point for the console application.
// Copyright 2005 Silicon Labs Inc. All rights reserved.
// Rev 0.0602
#include "stdafx.h"
#include "windows.h"
#include "stdlib.h"
#include <stdio.h>
#include <time.h>
char
char
char
char
void
void
void
void
bool
void
char
char
char
char
FILE
FILE
DCB
HANDLE
char
COMMTIMEOUTS
int
char
262
3. DTR is assumed to be connected to the ESC pin of the modem. It has been programmed to HANG UP when
4. When the modem is in RECEIVE operation (RTS negated), it is not possible to communicate with the
5. The modem “automatically” takes care of figuring out if it is supposed to be in “V.29 Long Train” vs. “V.29
6. Data to/from the modem is expected to be in V.80 format.
DTR is negated.
modem. The only control is to hang up using DTR.
Short Train”. The primary host responsibility is to take care of RTS.
fnamePatch[]=".\\patch.txt";
fnameTelno[]=".\\Tel_no.txt";
*SendAndWaitFor(char *cpCommand, char *cpInBuffRd,
*WaitForResponse(char *cpResponse, char *cpInputBuffer,
SetupSerPort(void);
AssertRTS(bool bAssert);
AssertDTR(bool bAssert);
Delay(long iMs) ;
GetFileTextLine(char *cpIn);
LoadAndSendPatch(void);
*cpInBuffer;
*cpOutBuffer;
*cpInputWr;
*cpErrorString;
*hpPatchFile;
*hpTelNoFile;
dcb;
hCom;
*pcCommPort = "COM1";
sCOMMTIMEOUTS;
iCharCount;
*cpInputRd, *cpInputRd_temp, cpInput_test[255];
char *cpResponse, int iTimeoutMs);
int iTimeOutInMs);
Rev. 1.3

Related parts for SI2457-D-FS