Sample Program - NorthStar HSIO-4 User's & Technical Manual

Horizon serial input/output four port
Table of Contents

Advertisement

3.2.4

SAMPLE PROGRAM

North Star HSIO-4
This section provides an example of how to
program the four HSIO-4 ports for use with
four asynchronous RS-232 terminals and/or
printers. Programming other configurations
requires a detailed familiarity with USART
operation. For the convenience of the
programmer, a complete manufacturer data sheet
for the USART is reproduced in Appendix B.
The following sample program:
1.
checks input status and inputs a
character for each of the four ports;
2.
checks output status and outputs a
character for each of the four ports;
3.
initializes the HSIO-4 board.
Nine routines are given:
CINA
inputs a character from port A
CINB
inputs a character from port B
inputs a character from port C
CINC
CIND
inputs a character from port D
COUTA outputs
COUTB outputs
COUTC outputs
COUTD outputs
INIT
initializes the HSIO-4 board
29
a character to port A
a character to port B
a character to port C
a character to port D
User/Technical Manual

Advertisement

Table of Contents
loading

Table of Contents