AX10445 Module Series User
’
s Manual
Application
27
4.4 Demo Program for TC for User to
Communicate with Remote Device
/* This is a demo program for testing AX10445 */
#include
<stdio.h>
#include
<stdlib.h>
#include
<dos.h>
/* take care of */
#include
<bios.h>
/* hardware jumper setting */
/* define channel 1 and 2 basic parameter COM1 COM2 COM3 COM4
*/
#define
CH1_PA
0x3f8
/* 3F8 2F8 3E8 2E8 */
#define
CH2_PA
0x2f8
/* */
#define
CH1_MASK
0x0ef
/* EF F7 EF F7 */
#define
CH2_MASK
0x0f7
/* */
#define
CH1_INTNO
0xc
/* 0c 0b 0c 0b */
#define
CH2_INTNO
0xb
/* */
/* define 8250 registers offset */
#define DATA
0
#define IER
1
#define IIR
2
#define LCR
3
#define MCR
4
#define LSR
5
#define MSR
6
/* 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)();
Содержание AX10445 Series
Страница 1: ...AX10445 Series Isolated Dual Channel RS422 485 Interface Module User s Manual...
Страница 10: ...AX10445 Module Series User s Manual 4 This page does not contain any information...
Страница 20: ...AX10445 Module Series User s Manual Setting up the AX10445 14 This page does not contain any information...
Страница 41: ...AX10445 Module Series User s Manual Application 33 return 0 void Reset_Buf rear1 front1 rear2 front2 0...
Страница 46: ...AX10445 Module Series User s Manual 36 This page does not contain any information...
Страница 48: ...AX10445 Module Series User s Manual 38 This page does not contain any information...
Страница 50: ...AX10445 Module Series User s Manual 40 This page does not contain any information...
Страница 52: ...AX10445 Module Series User s Manual 42 This page does not contain any information...
Страница 54: ...AX10445 Module Series User s Manual 44 This page does not contain any information...
Страница 58: ...AX10445 Module Series User s Manual 48 This page does not contain any information...