Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
if (condition 1) then
do the most important thing
else if (condition 2) then
do another thing
.....
else if(condition n) then
do the less important thing
end if
A 4-bit priority encoder (also sometimes called a priority decoder). This circuit basically converts the 4-bit input into a binary representation. If the input n is active, all lower inputs (n-1 .. 0) are ignored:
x3 x2 x1 x0 y1 y0
------------------
1 X X X 1 1
0 1 X X 1 0
0 0 1 X 0 1
0 0 0 X 0 0
priority encoders are commonly for interrupt controllers, to select the most critical out of multiple interrupt requests.
Imagine you have a microprocessor with only one external INT. Now you want to handle several external INT, so you put all your INT on the priority encoder inputs and through an OR gate to the µP INT pin.
When an INT occur, you just read the output of the priority encoder in order to know with INT is active.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.