E N G L I S H
47
MBS
0
0
0
LOW BAT
LSB
BIT 3
BIT 2
BIT 1
BIT 0
• LOW BATT= 0: INACTIVE = 1: LOW BATTERY
BIT 3 BIT 2 BIT 1 BIT 0
0
0
0
0 = DC mV
0
0
0
1 = AC/DC V
0
0
1
0 = AC/DC μA
0
0
1
1 = AC/DC mA
0
1
0
0 = AC/DC A
0
1
0
1 = Ohm (Ω)
0
1
1
0 = BEEP
0
1
1
1 = DIODE
1
0
0
0 = TEMPERATURE (°C/°F)
1
0
0
1 = CAPACITANCE ( μF)
1
0
1
0 = FREQUENCY (Hz)
5.3.3 Receive data format
STX
(1 BYTE): F2H
ID
(1 BYTE): 0.9H
DATA
(1 BYTE)
EXT
(1 BYTE): F3H
Example: POSITION DATA FORMAT
MBS
0
0
0
LONG KEY
LSB
BIT 3
BIT 2
BIT 1
BIT 0
BIT 4 = 0: LONG KEY INACTIVE = 1: LONG KEY
ACTIVE
BIT 3 BIT 2 BIT 1 BIT 0
0
0
0
0 = NO KEY
0
0
0
1 = RANGE KEY
0
0
1
0 = HOLD KEY
0
0
1
1 = AC/DC KEY
0
1
0
0 = RECORD KEY
0
1
0
1 = RELATIVE KEY
0
1
1
0 = PERCENTAGE KEY
0
1
1
1 = COMPARE KEY
1
0
0
0 = EDIT KEY
1
0
0
1 = CAPACITANCIA (μF)
1
0
1
0 = FRECUENCIA (Hz)
5.3.4 A sample Program (FICOM.H)
The following program is an example of a
C language program which helps users to
understand the data format and the data
interfacing method, and also to develop
their own programs.
[Interrupt Usage and Selection between COM1 and COM2]
#define COM1 0
#define COM2 1
/* Base addresses of serial ports */
#define COM1BASE 0x03f8
#define COM2BASE 0xx02f8
#define COMBASE (comport= =COM1) ? COM1BASE: COM2BASE)
/* Registers */
#define THR (0) /* Transmit Holding Register */
#define RBR (0) /* Receive Buffer Register */
#define IER (1) /* Interrupt Enable Register */
#define IIR (2) /* Interrupt Identification Register */
#define LCR (3) /* Line Control Register */
#define MCR (4) /* Modem Control Register */
#define LSR (5) /* Line Status Register */
#define MSR (6) /* Modem Status Register */