PC Interfacing Fourth Level Lecture Six: Serial To Parallel and Parallel To Serial Interface

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

PC Interfacing

Fourth Level
Lecture Six

Serial to Parallel and Parallel to


Serial Interface

Goals:
Up-on completing this lecture, the student should be able to:

1- Utilize the ITC232-A in the designs effectively to extend


the capability of the serial port.
2- Utilize the Serial to parallel concept in the design to
preserve more pins in sending data. enabling more interface
capability.
3- Utilize the concept of parallel to serial interface in reading
data to save more pins.
1. New Concepts for RS232 (ITC 232-A):-
ITC232-A is a new peripheral chip which is designed for easy interfacing with
the RS232 port on computers. It is connected to the RS232 port via three lines, TD,
RD and ground. The IC has a powerful built-in control command set and translator it
to machine code. Users can input command from keyboard, the IC decodes the
command & perform the action. This is advantageous over other I/O interfacing
schemes. Firstly, there is no need for users to learn low-level languages and hardware
controls. Secondly, there is no need to compile the instructions.
The ITC232-A has a 40-pin. The device requires a +5V power supply and
consumes 50 mA. The RS232 serial I/O command port operates with a baud rate from
300 to 115, 200. The IC has 24 I/O lines arranged in three ports A, B and C. They can
be configured individually as input or output. Bits 4 to 7 of ports A, B and C can be
used to drive 3PH stepper motors of speed range 10 to 4000 steps per second. Bits 0 to
3 of ports A, B and C can be used to measure resistance or capacitance. The device
offers a pulse-width modulated output with a frequency range from 10 Hz to 10 kHz
and a duty cycle range from 1 to 100%. The ITC232-A can be connected to the RS232
experimental board as shown in Figure 4.11. The full instruction set and application
notes are available from the manufacturer.

Figure 4.11: the internal block diagram


and an application of the ITC232-A
2. Serial to Parallel Interface:-

By using serial-in and parallel-out shift registers such as the 74LS164s, two
output lines from a computer can generate an unlimited number of outputs. Figure
4.12(a) shows how a 74LS164 is used to generate eight output lines from two output
lines of a PC. The 74LS164 has two serial data inputs, pins 1 and 2 (A and B) and
eight shift register outputs (Qa to Qh). At transition, the serial data bit presented at the
inputs A and B is shift to Qa. In the same time the value on Qa is shift to Qb, Qb to
Qc, etc. After eight clock cycles, the 8-bit byte can be loaded into the outputs of the
shift register. A logic low at pin 9 (-CLEAR) sets the eight outputs low. The maximum
input clock frequency is 25 MHz. Several 74LS164s can be used to generate more
outputs. The connection of the circuit to the RS232 experimental board is given in
Figure 4.12(a). We can see that RTS is connected to the serial data in (pins 1 and 2)
and DTR connected to the CLOCK (pin 8).

Figure 4.12: Serial to Parallel convertor circuits using 74LS164 and 74LS374
There are two problems associated with the serial-to-parallel interface. One is
the data transfer rate. A Pentium computer can output clock signal at a frequency in
the range from 0.1 MHz to 1 MHz. The more outputs you have in the circuit, the
slower the loading speed is. This is not a problem for low and medium speed
interfacing applications. The other problem is that during data loading, the output same
times changes randomly. To solve this, data latches such as the 74LS374 can be used
(see Figure 4.12(b)). After all data bits are loaded into the shift registers, they are
loaded into the 74LS374 by applying a low-to-high signal to the CLOCK of the
74LS374 (pin 11). The circuit, however, requires another output line from the
computer. For the RS232 port, TD line can be used. These circuits can be also used for
the Centronic port. The three lines could be the output lines of the data port or the
control port.
3. Parallel to Serial Interface:-

Using a parallel-in and serial-out shift register such as the CD4021, the number
of inputs to a computer can be expanded. It requires two output lines from the
computer (one to load parallel data and one to shift the data) and one input line to the
computer to read data. Figure 4.13 shows a circuit for inputting eight bits of data. The
pin-out of the CD4021 is also shown in Figure 4.13.
The IC has a CLOCK input (pin 10), a parallel-in/serial-in control input (P/-S,
pin 9), a serial data I/O (pin 11), eight parallel data inputs (D0 to D7) and three serial
data outputs (Q6 to Q8).
In operation, 8-bit data is present at the inputs. Then P/-S goes from low to high
to load the 8-bit data into the internal register (parallel-in operation). Next, P/-S is
brought low to terminate the parallel-in operation and to start the serial-out operation.
At transition, the input data bits are shift out. After eight clock cycles, the 8-bit data is
serially transmitted. The connection of the IC to the RS232 experimental board is
shown in Figure 4.13. CLOCK is connected to terminal DTR. P/-S control is
connected to terminal RTS. Output Q8 is connected to CTS terminal. This circuit can
be used with the Centronic port as well. Again there is a problem associated with the
data transfer rate. It can be used only for medium to low speed interfacing
applications.

Summary
1- The serial port is a powerful interface, yet it is not suffecient. Hence
expansion is needed (ITC232).
2- Serial to parallel conversion is really powerful when sendind data
(preserve pins
3- Parallel to serial is really powerful when receiving data (preserve pins)

Questions:
1- What does the ITC232 do? how to use it in the cct?
2- What is the role of serial to parallel converters? How to use them ?
3- What is the role of parallel to serial converters? How to use them ?

You might also like