beautypg.com

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

Page 54

background image

Appendix

COM-2(PC)F

45

Sample Program 1

This GW-BASIC sample program demonstrates the transmit-data
capability of COM-2(PC)F in Enhanced mode. First, it initializes
the Asynchronous Communication Element (ACE), then it
transmits the data input from the keyboard to the external device
through channel 1 (CN1).

None Key

In Key

No

Line Status

D5 bit = 1

Yes

1

Read

Interrupt ID Register

Read

Modem Status Register

Data Transmission

A$=INKEY$

1

Note:

Wait Time =

(sec)

Data Length

Baud Rate

START

Set Baud Rate

Generator

1

1

Set Modem Control

Output

Read

Line Status Register

Set

Interrupt Enable Register

Set Transmission Format

(Line Control Register)

Wait Time

(After Initialization)

Read

Received Data Register

Figure 6.3. Flowchart of Sample Program 1

This manual is related to the following products: