Ch2 - Lec1 - ES Implementation Alternatives
Ch2 - Lec1 - ES Implementation Alternatives
By Kassahun Tamir
1
Outline
General Purpose Processor (GPP)
Application Specific Integrated Circuits (ASIC)
Application Specific Instruction Set Processors (ASIPS)
Programmable hardware (FPGA: Field-programmable gate arrays)
Parallel vs Serial communication
Asynchronous serial communication (UART and RS-232/485)
Synchronous serial communication (I2C and SPI)
Debugging
By Kassahun Tamir 2
General Purpose Processor (GPP)
High Performance
✗ Highly optimized circuits and technology
✗ Use of instruction level parallelism
Superscalar
Super-pipelined
✗ Complex memory hierarchy
By Kassahun Tamir 3
General Purpose Processor (GPP)
Properties
✗ Good average performance of large application mix
✗ High power consumption
Examples: CPUs
By Kassahun Tamir 4
Application Specific Integrated Circuits (ASIC)
A microchip designed to perform a specific or unique application. It is
used as replacement to conventional general purpose logic chips.
ASIC integrates several functions into a single chip and thereby
reduces the system development cost.
By Kassahun Tamir 6
Programmable Hardware (FPGA)
FPGA (Field Programmable Gate Array)
An array of logic gates that are programmable in the “field”
The term “Field” indicates that the device is programmable outside the
factory where it is fabricated: programmable in the work “field”
inside FPGA
✗ Contains Look Up Tables (LUTs) which compute
By Kassahun Tamir 9
FPGA: Architecture
Tutorial as to how to design circuits ranging from just a gate to a
complex circuitry.
https://learn.sparkfun.com/tutorials/how-does-an-fpga-work/all
By Kassahun Tamir 10
Data Transmission
Computers transfer data in two ways
– Parallel
✗
8 or more lines (wire conductors) are used to transfer data
– Serial
✗
The data is sent one bit at a time
By Kassahun Tamir 11
Data Transmission
Parallel communication
– All bits of data are sent at a time
– Data transfer speed is high
– It is not preferred for long distance communication as it requires
more number of wires and becomes expensive.
– Used for short distance communication
Serial communication
– Only one bit is sent at a time
– Data transfer speed is low
– Used for long distance communication.
By Kassahun Tamir 12
Data Transmission
In serial communication
– At the transmitting end, the byte of data is converted into serial
bits (using a parallel-in-serial-out shift register)
– At the receiving end, the serial data is received and packed into
byte (using a serial-in-parallel-out shift register)
By Kassahun Tamir 13
Modes of Transmission
Simplex – the communication is unidirectional, or one-way
By Kassahun Tamir 14
Synchronous and Asynchronous Serial Communication
In Synchronous communication (I2C, SPI),
– common clock is used for transmitted and receiver
– A separate link is used to transmit the clock signal
– Block of data is transferred at a time
– Block-oriented data transfers use the synchronous method
In Asynchronous communication (UART, RS-232),
– the synchronization is achieved only at the beginning of the
transmission (by setting the same baud rate)
– A single byte of data is transferred at a time
– Is widely used for character-oriented transmission
✗ To transfer data in serial communication, the receiver and sender agree on
set of rules called protocol. By Kassahun Tamir 15
Serial Communication Interfaces: UART
UART (Universal Asynchronous Receiver Transmitter):
– A UART may be used when:
✗
High speed is not required
✗
An inexpensive communication link between two devices is required
– UART communication is very cheap:
✗
Single wire for each direction (plus ground wire)
✗
Asynchronous because no clock signal is transmitted
✗
Relatively simple hardware
By Kassahun Tamir 16
Serial Communication Interfaces: UART
GPS: NEO-6M
By Kassahun Tamir 17
Serial Communication Interfaces: UART
Before transmission begins, transmitter and receiver must agree on:
– Baud rate (such as, 9600): an indirect way of setting sampling
clock.
✗
In synchronous transmission, bits are sampled from a pulse
every one time period. Whereas in the case of asynchronous
communication such as UART, we set the sending and the
receiving ends with the same baud rate so that the receiver
know how often to sample the pulse. For example, without
baud rate the first three 1s in the following picture could have
been interpreted as four or two or another different number of
1s.
By Kassahun Tamir 18
Serial Communication Interfaces: UART
Before transmission begins, transmitter and receiver must agree on:
– Baud rate (such as, 9600): an indirect way of setting sampling
clock. GSM: SIM900A
– Stop bits: to declare end of frame
– 1, 1.5, or 2 stop bits
– 5, 6, 7, or 8 data bits GPS: NEO-6M
By Kassahun Tamir 24
Serial Communication Interfaces: I C 2
By Kassahun Tamir 25
Serial Communication Interfaces: I C 2
Top to bottom,
✗ Black for GND
✗ Red for V+
✗ White for SDA
✗ Green for SCL
STEMMA- Soil
Moisture Sensor
By Kassahun Tamir 26
Serial Communication Interfaces: I C 2
By Kassahun Tamir 27
Serial Communication Interfaces: I C 2
Application:
– Sensors: MCU to most of temperature, or moisture, or pressure
sensors
– Memory: accessing external EEPROM
By Kassahun Tamir 29
Serial Communication Interfaces: SPI
SPI (Serial Peripheral Interface):
✗ Synchronous serial communication
✗ Devices communicate in master/slave mode where the master
device initiates the data frame. Multiple slave devices are allowed
with individual slave select-SS (chip select-CS) lines
✗ No address decoding logic required, as there is a chip select line
for each slave.
✗ Master generates information on one line (MOSI/SDO) while
samples (read) from another line (MISO/SDI)
MOSI - Master Output Slave Input (Serial Data Out - SDO)
MISO – Master Input Slave Output (Serial Data In - SDI)
By Kassahun Tamir 30
Serial Communication Interfaces: SPI
SPI (Serial Peripheral Interface):
✗ Full duplex
✗ High throughput than I2C
✗ High speed
✗ Not limited to 8-bit words
By Kassahun Tamir 31
Serial Communication Interfaces: SPI
By Kassahun Tamir 32
Serial Communication Interfaces: SPI
Application:
– Sensors: temperature, pressure, ADC, touchscreens,
video game controllers
– Memory: Flash and EEPROM
By Kassahun Tamir 33
Serial Communication Interfaces: USB
USB (Universal Serial Bus):
✗ A common interface that is used to allow communication between
different peripheral devices like mice, digital cameras, printers,
keyboards, and many more with a host device such as PC or smart
phone.
✗ The host is the organizer and master of all traffic on the bus
✗ Intended to allow hot swapping and enhance plug-and-play.
✗ Older once: Type A and Type B
✗ Newer once: Mini-USB, Micro-USB, and USB-C cables
By Kassahun Tamir 34
Serial Communication Interfaces: USB
USB: Pin Configuration
✗ Pin1 (VBUS): It is red color wire, used for providing power supply
✗ Pin2 (D-): It is a differential pair pin available in white color, used for
connectivity of USB
✗ Pin3 (D+): It is a differential pair
pin available in green color, used
for connectivity of USB
✗ Pin4 (GND): It is a Ground pin,
available in black color.
By Kassahun Tamir 35
Serial Communication Interfaces: USB
USB (Universal Serial Bus):
Differential Signaling
Single-Ended Signaling
By Kassahun Tamir 36
Serial Communication Interfaces: USB
USB: Protocol Architecture
✗ To accommodate a large number of devices that can be added or
removed at any time, the USB has the tree structure shown below.
USB HUB
By Kassahun Tamir 37
Reading Assignment
From Microcomputer and Interfacing
✗ Digital to Analog and Analog to Digital Converters (ADC/DAC)
✗ Timers (PLL), Real time clock (RTC, Oscillators), Capture and
Compare
By Kassahun Tamir 38
Debugging
Bed of nails tester: named by analogy with a real world bed of nails
Bed of nails tester PCB
By Kassahun Tamir 39
spring-loaded pogo pins
JTAG
JTAG (Joint Test Action Group):
As pin density increased, Bed of Nails testers became no longer
feasible.
By Kassahun Tamir 41
Boundary Scan Architecture
Connection Test
Source: CORELIS
By Kassahun Tamir 42
ISP/ ICSP
In-System Programming (ISP) aka In-Circuit Serial Programming
(ICSP)
In-Circuit Serial Programming (ICSP) is used to program and debug
our devices without removing them from the circuit.
ICSP allows us to connect without removing them from the
microcontroller pins that support serial communication and transfer
data and commands through a simple protocol.
It is microchip’s proprietary method of programming the completer
rage of “reprogrammable” microcontrollers and is present in every
microchip device.
By Kassahun Tamir 43
ISP and ICSP
By Kassahun Tamir 45
Questions?
By Kassahun Tamir 46