beautypg.com

Figure 6.4. flowchart of sample program 2 – Compaq Contec COM-2(PC)F User Manual

Page 55

background image

Appendix

COM-2(PC)F

46

Sample Program 2

This GW-BASIC sample program demonstrates the receive-data
capability of COM-2(PC)F in Enhanced mode. First, it initializes
the ACE, then it transmits the data input from the external device to
CRT through CN1.

Set Baud Rate

Generator

1

Set Modem Control

Output

Read

Line Status Register

Read

Received Data Register

Set

Interrupt Enable Register

Set Transmission Format

(Line Control Register)

No

Line Status

D0 bit = 1

Yes

1

Read

Interrupt ID Register

Read

Modem Status Register

Display Receiver Buffer's

Data On CRT

START

Wait Time

(After Initialization)

1

1

Note:

Wait Time =

(sec)

Data Length

Baud Rate

Figure 6.4. Flowchart of Sample Program 2

This manual is related to the following products: