Combinational logic problem
Posted: Tue Sep 14, 2010 5:44 pm
This is either a complex problem, or a lack of my knowledge of basic digital electronics!
I'm designing a measurement system with 40 digital inputs. The inputs are probes in a water tank, so there will always be a point where the inputs uniformly change from 0 to 1 - i.e. the water level. I'd like to convert this into fewer inputs - preferably in a binary format - for input into a microcontroller (probably a PIC).
Aside from masses of AND/OR gates, there must be some way of converting a 40-way input into a 6-bit binary output! I can't find a UART with 40 inputs and PICs with >32 inputs are hard to get hold of. I'm so rusty with this stuff that it's starting to confuse me! Would an adder help? A counter of some sort?! Needless to say, I want to keep the component count down - the original design was a 54 input PIC.
Sorry if that's not really clear, please ask if anything needs clarifying.
Thanks.
I'm designing a measurement system with 40 digital inputs. The inputs are probes in a water tank, so there will always be a point where the inputs uniformly change from 0 to 1 - i.e. the water level. I'd like to convert this into fewer inputs - preferably in a binary format - for input into a microcontroller (probably a PIC).
Aside from masses of AND/OR gates, there must be some way of converting a 40-way input into a 6-bit binary output! I can't find a UART with 40 inputs and PICs with >32 inputs are hard to get hold of. I'm so rusty with this stuff that it's starting to confuse me! Would an adder help? A counter of some sort?! Needless to say, I want to keep the component count down - the original design was a 54 input PIC.
Sorry if that's not really clear, please ask if anything needs clarifying.
Thanks.