So Ive just started studying about the 8051 micro controller for my summer class in uni. My doctor told us that within the next 2 weeks he wants us to design a 4-2 priority encoder. My question is how is it possible to do so with the C51 programming. We should need inputs and outputs but how does the control work?
Just want an explanation not code guys that's for me to write.
So far I have searched about it and the ideas related to are towards security. I think what he wants is for us to have 4 inputs which then affects the output which will be in the term of an alarm or so.
A priority encoder doesn't care about anyones wants to do a security implementation. It just do what it should do and leave it up to the user to decide what actual signals that gets connected to the inputs and outputs.
en.wikipedia.org/.../Priority_encoder
So your priority #1 should be how a priority encoder functions and to implement one - not what possible uses your teacher might consider for having one. Take that as a secondary step.
Learn the truth-table of the priority encoder. understanding that would clear much of your doubts.
Dont make assumptions of how your teacher would want to apply priority encoder to use. Interrogate, in case of doubts.
Obviously you can't complete an assignments when you don't know what the assignment is!!
If you're not sure what your teacher wants, you must ask him!
We can't read his mind - it's up to you!