180 likes | 368 Views
Serial versus Parallel Data Transfers. Shift Registers Converting data from Serial Parallel . Shift Registers . Shift Registers convert numbers expressed in terms of several bits ( many signal lines) into a stream of 0s, 1s and a Clock.
E N D
Serial versus Parallel Data Transfers Shift Registers Converting data from Serial Parallel Jordan Nash - Microprocessor Course
Shift Registers • Shift Registers convert numbers expressed in terms of several bits (many signal lines) into a stream of 0s, 1s and a Clock. • Advantage: A convenient way to reduce the number of Electrical signal lines by factors of 8, 16, 32, 64. • Disadvantage: For the same transfer rate the electronics must be faster by factors of 8, 16, 32, 64. Jordan Nash - Microprocessor Course
This Shift Register converts data on a 4 bit parallel data bus into a serial bit stream When Parallel load is set, the S/R bits on the Flip Flops are arranged to latch in the bits on the data bus (1 bit on each Flip Flop) On each rising edge of the clock, The Data on the Flip Flops is put on the Q (Output Line), which appears at the input of the next flip flop. The input data is latched, and the bits move from one FF to the next It takes 4 clock cycles to move the 4 bits out to the serial ouput line A Four Bit Shift RegisterComposed of 4 D-Flip-FlopsParallel to Serial Conversion Jordan Nash - Microprocessor Course
Data is placed on the parallel data bus 1 0 1 0 PL: Data Loaded into Flip Flops 0 On Clock edge Data is shifted from output of each FF to the Input of the next Jordan Nash - Microprocessor Course
8 Bit Parallel to Serial Shift Register Jordan Nash - Microprocessor Course
Parallel to Serial Conversion:Parallel load a number then clock it out Jordan Nash - Microprocessor Course
Serial to Parallel shift register At each clock transition, the data is shifted to the next flip-flop in the chain We need to keep track of how many clock pulses we have sent to know when the full byte is on the outputs Jordan Nash - Microprocessor Course
Suppose you feed a ‘1’: Jordan Nash - Microprocessor Course
The 74HC165 Shift Register: Parallel to Serial 8-bit Word *Load Serial Data in Serial Out Clock Jordan Nash - Microprocessor Course
The 74HC165 Function Table Jordan Nash - Microprocessor Course
The 74HC164 Shift Register: Serial to Parallel Serial Data In Clock *Reset Parallel out Jordan Nash - Microprocessor Course
74HC164 Function Table Jordan Nash - Microprocessor Course
High Level Design The Project: Parallel To Serial ATmega128 Board 8-Bits of data (Parallel) Serial Data Shift Register 74HC165 PORTA Clock Shift/*Load Shift Register 74HC164 PORTD Clock 8-Bits of data (Parallel) Serial to Parallel Jordan Nash - Microprocessor Course
Low Level Design Wire up LEDs so that you can see the data arrive on the output Wire up a switch to the MR* line to allow you to clear the Shift Register outputs (make sure you understand how this works) Wire the input data to PORTA – remember to use the resistor packs The clock and PL bits should come from PORTD Jordan Nash - Microprocessor Course
The Serial Link Test Program Start Send new pattern to PORTA Look at the LEDs Load into the 165 using PORTD Clock the 165/4 8 times using PORTD Delay several seconds Jordan Nash - Microprocessor Course
Task Plan: Construct a device that will turn 8-bit parallel data from Port-A to serial data + clock . Construct a device that will receive serial data, convert them to parallel data and display them using LEDs. Write a program that will send several patterns down your ‘serial link’ and demonstrate that it works. Jordan Nash - Microprocessor Course