Project Check-off 2 UART Design Jeffrey Tsai. Project Thus Far FIFO SRAM UART IN UART OUT Main Control FSM Collision Audio In interface Audio Out interface.

Slides:



Advertisements
Similar presentations
Lab 7 : Decoders/Encoders : Slide #2 Slide #3 Slide #4 Slide #5 Slide #6 “1 of 10” Encoder “1 of 10” Encoder Connected to a SPST Keypad. Control Signal.
Advertisements

EXTERNAL COMMUNICATIONS DESIGNING AN EXTERNAL 3 BYTE INTERFACE Mark Neil - Microprocessor Course 1 External Memory & I/O.
Changes in input values are reflected immediately (subject to the speed of light and electrical delays) on the outputs Each gate has an associated “electrical.
1 Lecture 20 Sequential Circuits: Latches. 2 Overview °Circuits require memory to store intermediate data °Sequential circuits use a periodic signal to.
Dr. ClincyLecture1 Appendix A – Part 2: Logic Circuits Current State or output of the device is affected by the previous states Circuit Flip Flops New.
The 8085 Microprocessor Architecture
Microprocessor and Microcontroller
A-Level Computing#BristolMet Session Objectives#11 MUST identify the hardware required to connect to the Internet SHOULD describe how data is transmitted.
Checkpoint 3 To Do Hints General Debugging. To Do: Before Lab Plan layout of chips Wire sync separator, A/D, op amp and RC network Enter and simulate.
CS150 Project Checkpoint 1. Controller Interface Dreamkatz Controller Interface 1. The N64 Controller 2. Physical interface 3. Communication protocol.
CS150 Project Checkpoint 2 CheckPt2 is easy!!! BUT………………. This lab can be very tricky. BUT……………… Mark is here to help! You get to listen to cool.
Lab 5 Shift Registers and Counters Presented By Neha Kumar but while we wait for that to happen…
Video Interface Jeffery Tsai Sammy Sy And pretty much everything else too…. CS 150 CHECKPOINT 3.
Shift Registers and Counters By Lakshmi Things that appear hard are normally trivial, If you do the obvious in the obvious way. After all, how “tough”
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
Project Check Point 3 Audio Interface Jeff Du. Overview Project specs and overview next Tue. Mid-term next Thurs. This audio interface lab is REALLY easy.
EET 1131 Unit 12 Shift Registers
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
1 COMP541 State Machines – 2 Registers and Counters Montek Singh Feb 8, 2007.
Digital Fundamentals Floyd Chapter 9 Tenth Edition
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Counters and Registers
SEQUENTIAL CIRCUITS USING TTL 74XX ICS
Electronics Technology
CHAPTER 12 REGISTERS AND COUNTERS
1 4-Integrating Peripherals in Embedded Systems. 2 Introduction Single-purpose processors  Performs specific computation task  Custom single-purpose.
Registers CPE 49 RMUTI KOTAT.
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Unit 14 Derivation of State Graphs
Lecture Set 9 MCS-51 Serial Port.
Unit 4 Design and Synthesis of Datapath Controllers
Universal Asynchronous Receiver/Transmitter (UART)
Senior Project Presentation: Designers: Shreya Prasad & Heather Smith Advisor: Dr. Vinod Prasad May 6th, 2003 Internal Hardware Design of a Microcontroller.
BYU ECEn 320 Lab 4 UART Transmitter. BYU ECEn 320 UART Transmimtter Specification VGA Serial A1 Expansion Connector PS2 A2 Expansion Connector B1 Expansion.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
Universal Asynchronous Receiver/Transmitter (UART)
Registers Page 1. Page 2 What is a Register?  A Register is a collection of flip-flops with some common function or characteristic  Control signals.
Abdullah Said Alkalbani University of Buraimi
SEQUENTIAL LOGIC By Tom Fitch. Types of Circuits Combinational: Gates Combinational: Gates Sequential: Flip-Flops Sequential: Flip-Flops.
1 October 26, 2006ME 6405 MechatronicsSerial Communication Interface Brian Guerriero Jon Rogers Robert Thiets.
PROJECT - ZYNQ Yakir Peretz Idan Homri Semester - winter 2014 Duration - one semester.
Digital Logic Design.
IT253: Computer Organization Lecture 9: Making a Processor: Single-Cycle Processor Design Tonga Institute of Higher Education.
1 COMP541 State Machines – 2 Registers and Counters Montek Singh Feb 11, 2010.
CO5023 Latches, Flip-Flops and Decoders. Sequential Circuit What does this do? The OUTPUT of a sequential circuit is determined by the current output.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
THEME 6: Frequency dividers. Digital counters with reduced counting modulus. Programmable digital counters. If the input pulses are more than K, the counter.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
REGISTER TRANSFER LANGUAGE (RTL) INTRODUCTION TO REGISTER Registers1.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
Status and Plans for Xilinx Development
Serial Communications
The HCS12 SCI Subsystem A HCS12 device may have one or two serial communication interface. These two SCI interfaces are referred to as SCI0 and SCI1. The.
Serial mode of data transfer
Digital Electronics Multiplexer
Instructor: Alexander Stoytchev
Serial I/O and Data Communication.
Digital Electronics Multiplexer
Instructor: Alexander Stoytchev
Clock Domain Crossing Keon Amini.
Serial Communication Interface: Using 8251
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
EGR 2131 Unit 12 Synchronous Sequential Circuits
ECE 352 Digital System Fundamentals
ECE 352 Digital System Fundamentals
Serial Communications
Presentation transcript:

Project Check-off 2 UART Design Jeffrey Tsai

Project Thus Far FIFO SRAM UART IN UART OUT Main Control FSM Collision Audio In interface Audio Out interface Packet Logic

UART Message Definition Super-sampling Receiver Implementation Transmitter Implementation Xilinx and Debugging tips (time permitting)

Message Definition A low start bit followed by 8 data bits and a high stop bit. (clock is 250kHz) The wire is normally high. StartIdleD0D1D2D3D4D5D6D7StopIdle Time Figure 3: A UART transmission. TX TX_E

Super-Sampling We watch the incoming wire at 8 times the send rate. (2MHz) This makes it so we can catch a 250Khz message even if its phase is different from our internal 250KHz clock. Serial data input Sample Here

Receiver Implementation Nick Weaver’s UART – Receive design. Inputs: Serial-In, Reset, Clock Outputs: D[7:0], DRDY (data-ready) UART D[7:0] DRDY.H RESET.H OE.L SERIAL-IN.H Clock

How do I start?!? If the incoming message is 10 bits in length, and we super-sample at 8x, the message is complete when we receive 80 bits of data. How do we keep track of where I am in the message?

8-bit Binary Counter 3 Inputs to figure out : R, CE, C CE is on as long as you are receiving a new message C is the super-sampled clock frequency, NOT the incoming baud rate R is used to reset the counter once the message is complete

Count Enable Should be high when the input initially drops low for the start bit. Should stay high for the duration of the message by means of a PROCEED signal. CE = INPUT’ + PROCEED

Clock You’ve seen how to divide clocks already from previous labs. The clock that’s available on the board already (not from the Xchecker) is 16MHz. Use a binary counter to divide it. Sticky point: You send at 250kHz, you sample at 2MHz, your circuit needs one faster than that. Probably 8MHz.

Reset Should be reset when the counter enable is low. When the RESET button on the board is pressed, the counter should reset. When the message is done, and DRDY goes high (data ready), this should be reset for safety/reliability reasons. R = CE’ + RESET + DRDY

PROCEED Intuitively, it should catch the first super-sampled bit, and stay high for the duration of the message. This should be done with a flip-flop. PROCEED = INPUT’ + PROCEED But we sample from the middle of each signal, so instead, we use Q2 (3 rd bit from right of the counter)

There’s more! But this feedback loop will loop high forever! So when DRDY or RESET is asserted, PROCEED must be forced low. PROCEED = DRDY’ RESET’ (Q2+PROCEED)

Proceed (cont.)

Shift Register Inputs the data serially and outputs it to the rest of our design in a parallel fashion. All we need to determine is CE for the shift register. Since we sample on the forth super- sample per sample, just look at counter. CE = Q0’ Q1’ Q2

Why just the last 3 bits? 4 = = = = = Etc.

When do we stop? This design uses a 8-bit shift register to save space. Thus, we don’t want the stop bit to be shifted in. We want to stop at 9*8+3 = 75 75= DRDY = Q6 Q3 Q2’ Q1 Q0 UART-RECEIVE IS DONE!

UART-RECEIVE SUMMARY 8 Bit counter:CE = INPUT’ + PROCEED R = CE’ + RESET + DRDY C = 2MHz Clk Proceed: PROCEED = DRDY’ RESET’ (Q2+PROCEED) Shift Register:CE = Q0’ Q1’ Q2 DRDY = Q6 Q3 Q2’ Q1 Q0

UART-RECEIVE (cont) Do not take this for granted! I defined the important signals, the rest are trivial. Make sure you UNDERSTAND the design rather than just plugging it in!

What about transmit? Well, you tell me. Figure 2: UART Transmitter symbol. UART / TX D[7:0] SEND.H RESET.H SERIAL-OUT.H (TX) Clock OUTPUT_ENABLE (TX_E) Transmittin g

Specs for UART-Transmit The signal you send must comply with our message definition. A interrupt input (reset) is needed so back-off is possible. (remember that in the project, if what you read back isn’t what you wrote, you must stop transmitting) Need TX_E to be high while transmitting and low otherwise.

General Tips KISS (keep it simple stupid) If you have no clue what your circuit does, chances are, neither does anyone else. Don’t be afraid to play around with the signals in a way that makes it easy for you to debug. Learn to use the oscilloscope!

Playing with bus wires A complicated bus lets you combine multiple wires together to form a bus. Remember that a bus is just a collection of wires! Useful if you a bunch of signals that aren’t named to same into a bus.

Bus wires (cont.) Notice the Simple Box on top right is unchecked (its checked by default) Now I can specify each signal individually. Separate each one by comma.

Bus wires (cont.)

That’s All! Good luck and start early!