8 Bit Serial To Parallel Converter Verilog Code

Posted on

Sep 28, 2004 - Keep your verilog FSMs clean. “Parallel-to-serial converter”. Parallel inputs. Parallel outputs. Serial transmission. Shift Register Application. Binary counter: 000, 001, 010, 011, 100, 101, 110, 111, 000, 001, gray code counter: 000, 010. Four-bit Binary Synchronous Up-Counter.

Figure 6: Serial-to-Parallel IC chip The basic idea is to send a sequence of bits (i.e., positive pulses) down to the serial-to-parallel chip (74HC595). The 74HC595 will then convert this serial input into a parallel input and latch the output so it continues to drive the LED display until the next series of bits is received and latched. This operation, however, requires some degree of control. For instance, we need some way of telling the chip when the pulses are expected to occur and we need some way of telling the chip when to latch the data. This means that we need two control lines to the chip, in addition to the data line. Vaslj bika nezagojnaya rana sachinenne. To understand how these control lines work, we need to take a closer look at how the 74HC595 functions. The 74HC595 consists of an interconnected set of simpler digital circuits known as latches.

There are actually two banks (columns) of latches, each column consisting of 8 latches. Figure shows these two columns. The first column of latches form something known as a shift register. This bank accepts the serial input and shifts each bit in the series of input pulses down into the column. The second column of latches is used to store what is in the first column. This second column is connected to the chip's output and is used to drive the LED display.

This frees up the first column to receive another series of inputs, without disrupting the actual signals delivered to the 7-segment display. Figure 7: Timing diagram for the serial-to-parallel chip Each latch is a digital circuit with two inputs and one output. The top input with the black arrowhead represents the data and the other input with the white arrowhead represents a control. Prikaz myu rf ot 03112005 g 204 dsp. The lines with the black arrowhead are connected to the pin marked SER (serial input) and the lines with white arrowheads are connected to the pin marked SRCLK.

This line is sometimes called the clock line. When the data line (SER) is high and the control (SRCLK) is high, then the output of the latch is also high until it is reset.

BitConverter

When the data (SER) is high and the control (SRCLK) is low, then the output does not change from its previously latched value. The first column of latches are daisy chained together so the output of the top latch is the data input to the second latch. What we do, therefore, is input a bit string into SER along with a SRCLK signal. Each time SRCLK goes high, the data in a latch is shifted to the latch below it. We can therefore enter a string of 8 bits into the first column of latches by sending each bit along the SER line and then setting the SRCLK line high for each bit of data.