I'm building a digital volume / selector control circuit which uses an 8 bit comparator to compare the selected volume level (8 bit) with that from a clocked 4040 that cycles through 0 to 255. When the two are the same the circuit sends a latch signal to a display circuit (driven by the same clock and reset in sync with the 4040) so that the display shows the current volume level. This works for all values that are not divisible by 4. When you hit one those values - 4,8,12,16 etc - the displays will show an incorrect value or flicker. This seems to be caused by more than one latch signal being generated at these values - in theory there should be only one latch pulse for every 256 cycles of the clock. In the schematic 'LogicSMDV1' U16 compares the 4 least significant bits and, when they are equal, pin 6 goes high. This in turn enables pin 6 of U15 to go high when the 4 MSB are also the same which triggers the one-shot based around U18 and sends the latch pulse. When the volume data is 00000001 all looks good (Trace1 - only one latch pulse for 256 clock cycles), going to 00000010 and then 00000011 all remains good. When we reach 00000100 the displays shows '008' and the scope trace shows the output from pin 6 (A=B) has a clear high output corresponding to the length of a clock cycle and then two further short pulses that correspond with the 2 and 4 clock cycles later. These cause pin 6 of U15 to go high in the same fashion leading to the display circuit latching on 2 then 4 then 8. Since there's 250 clock cycles before the next latch the display shows a steady '008'. Every multiple of 4 shows similar issues, at 32 and 64 there are yet more 'false' latch signals - see traces.
Given the non-random nature of this there must be something that can be logically deduced here. I've spent several days trying to do that but I've run out of ideas. What I really don't understand is why U16 generates these brief A=B pulses on pin 6. Could it be an issue with U14 - the 4040?
In the 'scope trace images yellow = pin 6 of U18 (latch pulse), light blue = A<B, dark blue = A=B and purple = A>B these correspond to pins 7, 6 and 5 of U16 respectively.
The schematic for the display driver circuit is also included for reference.
Given the non-random nature of this there must be something that can be logically deduced here. I've spent several days trying to do that but I've run out of ideas. What I really don't understand is why U16 generates these brief A=B pulses on pin 6. Could it be an issue with U14 - the 4040?
In the 'scope trace images yellow = pin 6 of U18 (latch pulse), light blue = A<B, dark blue = A=B and purple = A>B these correspond to pins 7, 6 and 5 of U16 respectively.
The schematic for the display driver circuit is also included for reference.
Attachments
-
116.3 KB Views: 27
-
143.1 KB Views: 12
-
40.7 KB Views: 11
-
40.9 KB Views: 9
-
41.1 KB Views: 6
-
44.7 KB Views: 6
-
44.3 KB Views: 5
-
42.9 KB Views: 4