Kawasaki 80C152 User Manual

Page 58

Advertising
background image

KS152JB Universal Communications Controller
Technical Specifications

Kawasaki LSI USA, Inc.

Page 58 of 120 Ver. 0.9 KS152JB2

this same DMA bit.

The interrupts EGSTE (IEN1.5), GSC transmit error; EGSTV (IEN1.3), GSC transmit valid;
EGSRE (IEN1.1), GSC receive error; and EGSRV (IEN1.0), GSC receive valid; need to be
enabled. The DMA interrupts are normally not used when servicing the GSC with the DMA chan-
nels. To ensure that the DMA interrupts are normally not used when servicing the GSC with the
DMA channels. To ensure that the DMA interrupts are not responded to is a function of the user
software and should be checked by the software to make sure they are not enabled. priority for
these interrupts can also be set at this time. Whether to use high or low priority needs to be
decided by the user. When responding to the GSC interrupts, if a buffer is being used to store the
GSC information, then the DMA registers used for the buffer will probably need updating.

After this initialization, all that needs to be done when the GSC is actually going to be used is:
load the byte count, set-up the source addresses for the DMA channel servicing the transmitter,
set-up the destination addresses for the DMA channel servicing the receiver, and start the DMA
transfer. The GSC enable bits should be set first and then the GO bits for the DMA. This initiates
the data transfers.

This simplifies the maintenance of the GSC and can make the implementation of an external
buffer for packetized information automatic.

An external buffer can be used as the source of data for transmission, or the destination of data
from the receiver. In this arrangement, the message size is limited to the RAM size or 64K, which-
ever is smaller. By using an external buffer, the data can be accessed by other devices which may
want access to the serial data. The amount of time required for the external data moves will also
decrease. Under CPU control, a “MOVX” command would take 24 oscillator periods to complete.
Under DMA control, external to internal, or internal to external, data moves take only 12 oscilla-
tor periods.

3.5.4 BAUD RATE

The GSC baud rate is determined by the contents of the SFR, BAUD, or the external clock. The
formula used to determine the baud rate when using the internal clock is:

(fosc)/ ((BAUD +1)*8)

For example if a 12 MHz oscillator is used the baud rate can vary from:

12,000,000/ ((0+1)*8) = 1.5 MBPS

to:

12,000,000/((255+1)*8) = 5.859 KBPS

There are certain requirements that the external clock will need to meet. These requirements are

Advertising
This manual is related to the following products: