- This topic has 2 replies, 3 voices, and was last updated 7 years, 11 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › Using multiple inputs on the same port of 8051
Hi,
Is there any way to using multiple inputs on the same port of 8051. Almost like automatic swicth selectors for a specific port. What I want to do is to use more than one input on the same port but I have to instruct the 8051 in the codes to switch automatically from one input to another when it is needed. The scenario I have is that I want to use only port 0 to use 3 sensors (Light, Proximity and Temperature). How can I go about doing this? Please help me.
Hi Jules
What I have interpreted from your doubt is that you want to dedicate only one PORT for interfacing light,proximity and temperature sensors, also you might be using ADC concept with this, is it so? If yes, then of course you can do this. There are many ways of performing the same but the main idea lies in multiplexing these sensors. You could use a multiplexer (4:1 in this case) or make your own using BJTs, I would suggest you the former. It is simple, the output pin of multiplexer will be connected to the input pin of ADC IC like ADC0804/08/09. The three sensors will be connected to individual input pins of the multiplexer. You'll also need some I/O pins as selection pins for multiplexing.
This might help.
you can use 8 channel ADC 0808 with 8051 and then connect atmost 8 sensors with only port