41
Chapter 4: Programming Guide
4.0) Introduction
This chapter describes programming the PC 62C at its lowest level. In order to
accomplish this, detailed knowledge of chapter 4 and the system hardware is required.
As an alternative to low level programming, driver software is provided with the PC
62C. This is described in Chapter 5.
The advantages of using the driver software are:
a) Detailed knowledge of the PC 62C is not required.
b) The Driver Libraries supports multiple boards. In other words, you can cascade
boards in the same computer.
c) The Driver Library is callable from most high level languages.
Programmers who need to incorporate special routines into their application will need to
read this chapter. Examples are application programs written in Clarion, Clipper, etc.
Once the PC 62C has been installed into the computer and external connections are
made, the board is in an operational state. The PC 62C occupies 32 consecutive Word
I/O addresses starting from the board's base address. The base address is set by the DIP
Switch on the PC 62C. Programming the PC 62C is done by using input/output
instructions in assembly or any other programming language. Reading and writing to
these addresses allows data to be moved to and from the PC 62C.
Reading and writing to these ports are normally 16 bit wide. 8 bit Wide Read/Write is
also supported but not recommended. Reading and Writing typically takes on the form of
one of the following instructions:
Language Port Read Port Write
'C' value = inp(addre); outp( addre, value); (8 bit Read/Write)
value1 = inpw(addre); outpw( addre, value1); (16 bit Read/Write)
‘Pascal’ value := port[addre]; port[addre] := value; (8 bit Read/Write)
Value1 := portw[addre]; portw[addre] := value1; (16 bit Read/Write)