AIM104-SER4 Technical Manual Programming the SCC
© 2008 Eurotech Ltd Issue E 10
Programming the SCC
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 is available from Eurotech Ltd Technical support or via the Zilog Website
(
www.zilog.com). Alternatively, it is available from any Zilog distributor. 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. For examples of
basic SCC initialisation, please refer to the source code of the programs on
the utility disk.
Each SCC occupies four I/O locations in the AIM104-SER4 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.
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.
Baud rates
The SCC has one 16-bit baud rate counter per channel for both receive and transmit,
so both run at the same baud rate. In asynchronous mode, the clock must be used in a
x16 mode , so the baud rate calculation is:
time constant = -2
Typical baud rates and their time constants are:
Typical baud rates
The 16-bit counter is set up by writing the lower byte of the time constant to SCC
register 12 (decimal) and the upper byte to register 13 (decimal). The baud rates above
all have time constants of less than 256, so their upper bytes are all zero.
Baud Time constant
57600 0
38400 1
19200 4
9600 10
115200
baud rate