Compaq RS-232C Computer Hardware User Manual


 
Appendix
COM-2(PC)F46
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