4
ABBOTTABAD Lab Assignment#11 Subject: Industrial Electronics Submitted By: Naveed Mazhar FA09-BEE-143 Submitted To: Sir Muhammad Sajjad Durani Date: 22nd November, 2012

Encoder implementation in ladder Logic

Embed Size (px)

DESCRIPTION

Industrial Electronics

Citation preview

Page 1: Encoder implementation in ladder Logic

ABBOTTABAD Lab Assignment#11

Subject: Industrial Electronics

Submitted By:

Naveed Mazhar FA09-BEE-143

Submitted To:

Sir Muhammad Sajjad Durani

Date: 22nd November, 2012

Page 2: Encoder implementation in ladder Logic

ENCODER An encoder takes all its data inputs, one at a time and converts it to a single encoded

output. An n-bit binary encoder has 2ⁿ input lines and n bit output lines. Commonly 4-to-

2, 8-to-3 and 16-to-4 encoders are configured.

Block Diagram (4 to 2 Encoder):

Truth Table:

Data Input Output D3 D2 D1 D0 Q1 Q0

0 0 0 0 x x

0 0 0 1 0 0

0 0 1 0 0 1

0 1 0 0 1 0

1 0 0 0 1 1

GATE LEVEL IMPLEMINTATION (4 to 2 Encoder):

Page 3: Encoder implementation in ladder Logic

LADDER DIAGRAM:

Priority Encoder

Truth Table (4 to 2 Priority Encoder):

Data Input Output D3 D2 D1 D0 X Y

0 0 0 0 X X

0 0 0 1 0 0

0 0 1 X 0 1

0 1 X X 1 0

1 X X X 1 1

Page 4: Encoder implementation in ladder Logic

GATE LEVEL IMPLEMINTATION (4 to 2 Priority Encoder):

LADDER DIAGRAM: