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