42
‘Assembly’ mov al, value mov al, value (8 bit Read/Write)
mov dx, addre mov dx, addre
in al, dx out dx, al
mov ax, value1 mov ax, value1 (16 bit Read/Write)
mov dx, addre mov dx, addre
in ax, dx out dx, ax
where: addre is the I/O location of the PC 62C registers
value is the byte read or written to the register
value1 is the word read or written to the register
4.1) Initialising the PC62C
The PC62C board should be initialised before accessing any data from the Board. To
maintain compatibility with the PC62B, the following initialization routine should be
done.
a) Write a zero to the IGATE Register (offset 6)
b) Write a zero to the GLMUX Register (offset 4)
c) Write a zero to the GLOBAL Register (offset 2)
Note that the above registers default to zero upon powerup. However, it is important that
the above should be initiated to ensure proper operation.
4.2) Reading the Opto-Isolators using Polled I/O
If standard polling on the opto-isolators is required, it can be done as follows:
a) Disable Normal Interrupt Mode by writing a zero to the IGATE Register (offset 6).
b) Disable Global Interrupt Mode by write a zero to the GLMUX Register (offset 4).
c) Disable the MUX control lines by write a zero to the GLOBAL Register (offset 2).
d) Initiate a read on the OPTORD Register.
e) Repeat cycle from d).