You are on page 1of 28

Microprocessor Programming

and Interfacing
Basic Digital Devices

Dr. Suvadip Batabyal


Dept. of CSIS
BITS Pilani, Hyderabad

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Objective
• Review digital electronics needed for MP hardware
design.

11-Jan-19 2

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Analog and Digital Signal

V
V
+5 +5
1 0 1

Time Time

–5 –5

11-Jan-19 3

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Binary Logic

11-Jan-19 4

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Binary Variables
 Binary values
 High and Low
 True and False
 1 and 0
 Yes or No
• Basic binary
operations
 AND
 OR
 NOT

11-Jan-19 5

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Binary Logic
Binary Logic - Binary variables & set of logical operations

Binary variables represented by alphabets

Three basic logical operations

AND A B Y
0 0 0
0 1 0
1 0 0
1 1 1
11-Jan-19 6

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Binary Logic
Digital Design
Binary Logic - Binary variables & set of logical operations

Binary variables represented by alphabets

Three basic logical operations


A B Y
AND 0 0 0
0 1 1

OR 1 0 1
1 1 1

11-Jan-19 7
ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION
Binary Logic
Binary Logic - Binary variables & set of logical operations

Binary variables represented by alphabets

Three basic logical operations

AND
A Y
0 1
OR 1 0

NOT
11-Jan-19 8

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Binary Logic
Digital Design
Binary Logic - Binary variables & set of logical operations

Binary variables represented by alphabets

Three basic logical operations Logic Gates

AND

OR
Realised ?

NOT
11-Jan-19 9

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Masking

0 1 1 0 1 0 1 1
0 0 1 1 1 1 0 0
0 0 1 0 0

0 0 1 0 1 0 0 0

11-Jan-19 10

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Concatenation
0 0 1 1

1 0 1 1
0 0 0 0

0 0 0 0

0 0 1 1 1 0 1 1

0 0 1 1
Shift &
0 0 1 1 1 01 1
OR
1 0 1 1

11-Jan-19 11

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


NAND-NOR Implementations
NAND gate realization

A A’

(A’B’)’

B = (A’)’ + (B’)’
B’
=A+B
11-Jan-19 12

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


NAND-NOR Implementations
NOR gate realization

A A’
(A’ + B’)’

= (A’)’ . (B’)’
B B’ =A.B

11-Jan-19 13

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


XOR
x y z
0 0 0
0 1 1 0 0 1 1
1 0 1
1 1 0
1 0 0 0
Comparator

1 0 1 1

Z  X .Y  X .Y

11-Jan-19 14

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Inverter

x z
0 1
1 0

11-Jan-19 15

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Timing Diagram

11-Jan-19 16

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Three-State Gate
ENB

X Y X

ENB X Y
0 X High imp (Z)

1 0 0
1 1 1

The Output is Low The Output is High High Impedance


11-Jan-19 17

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Tri-state bus

Active low Active high

11-Jan-19 18

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Tri-state bus
1
0

D0
D0

Data-in
1

D1 D0
D1

D2
D2

D3
D3

11-Jan-19 19

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Example
• The output of below block is driven by 4 inputs. All the inputs
and output are 1 bit width. The selection of the input is done by D0
the two address bits A0 and A1 and En’ as per truth table given D1
below. Design the block using logic gates Output
D2
2

D3

A0 A1 En/

A1 A0 En/ Output
x x 1 High Imp
0 0 0 D0
0 1 0 D1
1 0 0 D2
1 1 0 D3

11-Jan-19 20

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Fan-out
 I OH I OL 
min 
Fan _ out  max  I , I 
 IH IL 
 max(
min Logic H output fanout, Logic L output fanout )

• This means that each gate can drive 10 other gates in the same family
without getting out of its guaranteed range of operation.

• In cases where more than 10 gates are connected to the output of a


single gate of this family, the output voltage levels will degrade and the
gate will slow down.

• Modern MOS logic families have a fan-out of about 50, since each gate
must source or sink a current only during the transition from H to L
or L to H.

11-Jan-19 21

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Multiplexer (2-to-1)

11-Jan-19 22

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Multiplexer (4-to-1)

11-Jan-19 23

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Multiplexer (8-to-1)

Note the
Enable
input

This is
Active Low
Output

11-Jan-19 24

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


De-multiplexer

11-Jan-19 25

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


1-to-8 Demultiplexer

11-Jan-19 26

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Registers

11-Jan-19 27

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION


Thank You.

Questions???

11-Jan-19 28

ELECTRICAL ELECTRONICS COMMUNICATION INSTRUMENTATION

You might also like