Demo Program For Tc For User To Communicate With Remote Device - AXIOMTEK AX10445 Series User Manual

Isolated dual channel rs422/485 interface module
Table of Contents

Advertisement

4.4 Demo Program for TC for User to
Communicate with Remote Device
/* This is a demo program for testing AX10445 */
#include
#include
#include
#include
/* define channel 1 and 2 basic parameter
* /
#define
#define
#define
#define
#define
#define
/ * define 8250 registers offset */
#define DATA
#define IER
#define IIR
#define LCR
#define MCR
#define LSR
#define MSR
/ * define buffer size */
#define BUFSIZE 512
/ * define operating variable */
static char
inbufl[BUFSIZE];
static int
rearl, front1;
static char
inbuf2[BUFSIZE];
static int
rear2,front2;
static char
showbuf1[BUFSIZE];
static int
sil;
static char
showbuf2[BUFSIZE];
static int
si2;
static void
interrupt (*oldch1)();
static void
interrupt (*oldch2)();
Application
<stdio.h>
<stdlib.h>
<dos.h>
<bios.h>
CH1_PA
CH2_PA
CH1_MASK
CH2_MASK
CH1_INTNO
CH2_INTNO
0
1
2
3
4
5
6
AX10445 Module Series User's Manual
/* take care of */
/* hardware jumper setting */
COM1 COM2 COM3 COM4
0x3f8
/* 3F8
0x2f8
/ *
0x0ef
/* EF
0x0f7
/ *
0xc
/* 0c
0xb
/ *
2F8
3E8
2E8 */
* /
F7
EF
F7 */
* /
0b
0c
0b */
* /
27

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AX10445 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Ax10445aAx10445b

Table of Contents