ranco980
Newbie level 4
Hi :-o
i am looking for a way to detect both ground and 12V (actualy between 11V and 14V) at the same input with a microcontroller.
i thought of two solution that i am looking for the best way to implement (cost/affective)
1. connecting the same input to two microcontroller inputs 1 for ground and 1 for 12V: adantage: inputs can be fast and clean (can use it for both regular inputs and digital signals disadantage: waisting 2 microcontroller inputs, waisting transistors. is there a good chip for that?
2. i am not sure how to do that but i was thinking maby using the ADC input. perhaps i can make the input be for example 2.5V when input is floating, ~5V when input is about 12V and 0V when input is ground. adantage: sounds like a cheap solution (aldo i am not sure how to do that), using only one input dissadvantage: slow reading
i was hoping to get best ways to implemt both solutions (or if one has a better one :wink
Thx in Advanced and BR
Ran.
i am looking for a way to detect both ground and 12V (actualy between 11V and 14V) at the same input with a microcontroller.
i thought of two solution that i am looking for the best way to implement (cost/affective)
1. connecting the same input to two microcontroller inputs 1 for ground and 1 for 12V: adantage: inputs can be fast and clean (can use it for both regular inputs and digital signals disadantage: waisting 2 microcontroller inputs, waisting transistors. is there a good chip for that?
2. i am not sure how to do that but i was thinking maby using the ADC input. perhaps i can make the input be for example 2.5V when input is floating, ~5V when input is about 12V and 0V when input is ground. adantage: sounds like a cheap solution (aldo i am not sure how to do that), using only one input dissadvantage: slow reading
i was hoping to get best ways to implemt both solutions (or if one has a better one :wink
Thx in Advanced and BR
Ran.