
2192-09375-000-000
J228 PCSER4
The Registers on PCSER4: Table 2 - Indexed Special Functions
How to Write to the Registers
It is useful to remember that the pointer register only needs to be written to once, if only one
register is read or written. This means that I/O can be done with byte reads and writes. However,
if your program is continually changing registers, it must write a new pointer value each time it
accesses a new register. This can be done by writing a pair of bytes as a word, because the
CPU in a PC does word writes to the bus by writing the lower byte first, this setting up the
pointer register first.
Programming the SCC
Introduction
The SCC is a versatile and powerful device and as such requires careful initialisation. For this
reason, it is strongly recommended that the SCC manufacturer’s manual is used. This may be
obtained by calling Arcom Technical Support on +44 (0) 1223 410 457. It should be noted that it
is not software-compatible with the PC 8250-type UART.
The order in which registers are initialised is important and a register may need to be accessed
more than once during initialisation. It is not worth taking short cuts, or unreliable operation may
result. For examples of basic SCC initialisation, please refer to the programs on the utility disk.
Each SCC occupies four I/O locations in the PCSER4’s indexed I/O map; two consecutive
locations per channel. The lower address of each pair is the control and status register, which is
also multiplexed with the control/status pointer register; the higher address of each pair contains
data transmit and receive latches.
Like the PCSER4, the SCC itself has an indexed register scheme for the status and control
registers, but not for the serial data registers themselves. The important difference here is that
because the register pointer latch occupies the same I/O location as the control and status
registers themselves, the pointer latch always has to be written before each register data write
or read. The one exception to this rule is status register 0, which can be read without having to
write ‘0’ first.
Initialising SCC Control Registers
From the above, it can be seen that initialising an SCC channel involves the following steps:
i.
register to the base address of the PCSER4. See Table 1 - Indexed I/O Registers
Write the address, in the PCSER4’s indexed I/O map, of the desired channel’s control/status
ii
Write the SCC’s control register number to the PCSER4 base address +1
iiii
Write the new register contents to the PCSER4 base address + 1
iv
Repeat steps (ii) and (iii) for each of the SCC registers until all have been initialised
Transmitting and Receiving Data
The tables show the steps required to transmit and receive data in polled mode.
Page 5
Pointer Value
(hex)
81
Read
Board Ident
Reading this should always give a
value of 10 (hex) for the PCSER4
80
Write
User LED
Writing 01 switches the green LED on.
Writing 00 switches it off
Read/Write
Register Name
Comments