Hey all,
I am working on a digital-ish ammeter for my power supply. I am using about 6 reference voltages (from series resistors) to compare this to a known resistor voltage and in turn find the current (in piecewise ranges).
The 339's are working as far as distinguishing if the voltage is above or below the threshold. Here is an example truth table for my data:
Input Comp1 Comp2 Comp3 Comp4
0 0 0 0 0
1 1 0 0 0
2 1 1 0 0
3 1 1 1 0
4 1 1 1 1
I was using another row of comparators to now compare these values (1 and 2, 2 and 3, 3 and 4) to find the range of the input. The problem is that for some reason the comparators are working sort of funny (not just around the reference voltage either). Is it possible to use the comparators in this way (like a XOR) gate?
The final truth table should be like this:
Input Out(1-2) Out(2-3) Out(3-4)
0 0 0 0
1.5 1 0 0
2.5 0 1 0
3.5 0 0 1
Thanks. I am not worried about the output changing erratically at the threshold voltages.
John
I am working on a digital-ish ammeter for my power supply. I am using about 6 reference voltages (from series resistors) to compare this to a known resistor voltage and in turn find the current (in piecewise ranges).
The 339's are working as far as distinguishing if the voltage is above or below the threshold. Here is an example truth table for my data:
Input Comp1 Comp2 Comp3 Comp4
0 0 0 0 0
1 1 0 0 0
2 1 1 0 0
3 1 1 1 0
4 1 1 1 1
I was using another row of comparators to now compare these values (1 and 2, 2 and 3, 3 and 4) to find the range of the input. The problem is that for some reason the comparators are working sort of funny (not just around the reference voltage either). Is it possible to use the comparators in this way (like a XOR) gate?
The final truth table should be like this:
Input Out(1-2) Out(2-3) Out(3-4)
0 0 0 0
1.5 1 0 0
2.5 0 1 0
3.5 0 0 1
Thanks. I am not worried about the output changing erratically at the threshold voltages.
John