English
Language : 

CD1284 Datasheet, PDF (93/176 Pages) Intel Corporation – IEEE 1284-Compatible Parallel Interface Controller with Two High-Speed Asynchronous Serial Ports
IEEE 1284-Compatible Parallel Interface Controller — CD1284
6.2.2
6.2.3
Global Function Initialization
Once chip reset has been completed, the next step is to set the Global Operating mode and timer
prescale. All other initialization occurs at the channel level.
Set the Prescaler Period Register (PPR)
The PPR sets the master time ‘tick’ for the CD1284. It is a binary value that sets a constant by
which the system clock is divided (after a fixed prescale of 512) to produce the internal clock for
the on-chip timers (This does not include baud rate generators). This clock is used for receiver
FIFO time-out generation and delay timing for the insert delay command in the embedded transmit
command set. For example, to generate a timer clock of 1 ms, the value is computed as:


2----5-5--M-1---2-H-----z-
× 1ms
=
48.828
The value 49 is loaded into the PPR. This value, selects an approximate 1-kHz clock as the source
for the RTPR (Receiver Time-out Period registers) of each channel. Those registers are loaded with
an appropriate value divisor that generate the desired character time-out periods. This value, 49, is
the recommended minimum value that is placed in the PPR for a clock frequency of 25 MHz.
Values that generate a time period of less than 1 ms adversely affect the performance of the MPU,
and thus, overall serial data performance.
Serial Channel Initialization
At this point, the basic operation of the CD1284 serial channels are set up. The internal register
states are cleared and basic timer operations are initialized. The next step is programming the
operating modes of each channel. This includes setting the values for the interrupt vectors, the
receive and transmit baud rates, number of bits per character, number of stop bits, parity, special
characters, if any, and so on. Each channel can have a completely unique set of operating
characteristics or they can all be the same.
Serial channel initialization is application-dependent. The operating modes of one channel have no
effect on the operation of others.
The following code, is a typical initialization sequence for setting up a single serial channel:
9600 baud, send and receive
8 bits per character, 1 stop bit,No parity
Automatic In-Band (Xon/Xoff) flow control
Transparent flow control
Special character detect enabled
Eight character receive FIFO threshold
Receiver and transmitter enabled for interrupt operation
Enable ISTRIP on incoming characters
A clear way of showing this initialization sequence is by a ‘C’ program fragment; the code shown
below, is compatible with Borland Turbo C:
/* Init channel. Channel number is included in call. Register names and addresses
are defined in the header file (not shown). This routine does not include parallel
channel initialization. */
init_channel(chan)
char
chan
{
Datasheet
93