Produce variable number of consecutive pulses based on binary number.

Thread Starter

Sparkst3r

Joined Sep 9, 2015
5
Context/background: For a project I need to shift the position of a large number on a display with only 8 digits. This mean I can scroll the number across the available digits on the display.
The project in more detail is a frequency counter using mostly all 1970-1980's parts, so no microcontrollers or FPGAs only TTL 7400 logic. I will use nixie tubes to display the output frequency.

For example I have a frequency of
1592874.000Hz that I would like to display on an 8 digit display. I chose 10khz shift, which means the digit just before the dp is worth 100Hz.
Outputting a result of 159.28740. On the display the decimal point moves to correct for the 10 shift and the kHz light is lit.

What I'm currently doing:
Ignoring the counting circuit and output drivers I have one board per digit to control the position of the digits and also contains chips for averaging the result over time(if selected). In this case all it contains is a shift register(74LS194, bidirectional side loading/unloading). Assuming the shift registers have already loaded the counted/averaged frequency.
From the switch on the front panel a range is selected, say kHz, meaning a shift of 3 decimal places must be carried out, I convert the selected number into binary using a DTL diode steering arrangement. The digits are stored as BCD so 4 shifts need to happen to shift the number by one decimal place meaning a total of 12 shifts are needed to put the digits in the correct place.

This is the circuit I came up with to do this:

The counters in the lower left are 74LS162s which is slightly unconventional but it's all I've got at the moment, unless someone knows where I can get some 74LS93s and 74LS90s cheaply(With 70s-80s datecodes) in the UK.
The multiply by 4 is done by shifting the bits 2 bits left.
The XOR/NOT gates compare the current counted number against the desired number of shifts and then the 4inAND will go high when the numbers match and then stop any more clock pulses reaching the clock in of the counter.
The pulse output goes to the clock of the shift registers.


Problem:
You'll notice this is only going to output 4n-1 pulses because as soon as the counter reaches the desired number the clock has already been disabled to the counters clock AND gate.
I can think of two possible ways that I can use to fix this, somehow subtract 1 from the output of the counter probably using an adder using ones complement or some hacky delay that will allow 1 more pulse through before the gate closes.
Or am I completely barking up the wrong tree and theres some simple way of doing this that I've missed?

Thanks in advance for any help.
 

GopherT

Joined Nov 23, 2012
8,009
1592874.000Hz that I would like to display on an 8 digit display. I chose 10khz shift, which means the digit just before the dp is worth 100Hz.
Outputting a result of 159.28740. On the display the decimal point moves to correct for the 10 shift and the kHz light is lit.
I don't understand your goal. First, how do you expect to get a fraction of a hertz accuracy? That is,now do you achieve an input of 1592874.000Hz in the first place? Are you acquiring the frequency counts for 1000 seconds and then dividing by 1000? Or are the three decimal places meaningless?

Normally, on old-school frequency counters, there is a switch to change the count acquisition time AND the decimal point position. For example, in standard position, you collect frequencies up to 7 digits 9999999 Hz in standard position during a 1 second gate time. For higher frequencies, a switch is thrown and a gate time of 0.1 seconds is used AND the input signal is fed to two cascaded decade counters to divide by 100 before entering the same cascade of counters that are linked to the display - essentially dividing by 1000. The switch also turns on a decimal point to the left of the third digit (essentially showing MHz to three decimal places). A little switch shows whether you have Hz or MHz displaying. Mine goes to 525MHz. A heathkit from about 1976-78 era with all discrete components.
 

Thread Starter

Sparkst3r

Joined Sep 9, 2015
5
I don't understand your goal. First, how do you expect to get a fraction of a hertz accuracy? That is,now do you achieve an input of 1592874.000Hz in the first place? Are you acquiring the frequency counts for 1000 seconds and then dividing by 1000? Or are the three decimal places meaningless?
The averaging function does that, it'll take up to 1000 samples and produce an averaged frequency instead of a gate time of 1000 seconds. I can choose the timebase independently.
It may not seem to useful but I have had 2 cases where I needed to measure a frequency in the hundredths of a hertz. It doesn't add much overhead to just add averaging.

Normally, on old-school frequency counters, there is a switch to change the count acquisition time AND the decimal point position. For example, in standard position, you collect frequencies up to 7 digits 9999999 Hz in standard position during a 1 second gate time. For higher frequencies, a switch is thrown and a gate time of 0.1 seconds is used AND the input signal is fed to two cascaded decade counters to divide by 100 before entering the same cascade of counters that are linked to the display - essentially dividing by 1000. The switch also turns on a decimal point to the left of the third digit (essentially showing MHz to three decimal places). A little switch shows whether you have Hz or MHz displaying. Mine goes to 525MHz. A heathkit from about 1976-78 era with all discrete components.
I have an old-ish Racal frequency counter that works like that just using a range switch that moves the dp but without the Hz/Mhz switch. The only thing I don't like which prompts me to add it to my own is that you cant view tenths of a hertz on a signal over 100 khz, as it falls off the left digit on the display. Side note: Racal use a LOT of custom ICs and resistor networks in their counters. It was a waste of time trying to reverse engineer it.

I also found a guy that produces prescaler kits to upgrade old 100MHz counters to theoretically 100Ghz but in practice it's only reliable up to 10GHz. I looked up the parts used and most were in production since the early 1990s which isn't too far out of my target time period. This also means I'm going to need at least another couple of range positions.

So I thought, since I have a source for old wafer switches, I may as well just make it variable and move the decimal point around.

After considerable(I slept on it) decision making I've concluded I'll just stick an adder in after the counters and make the XOR gates think that it has one more pulse to make before it should cut the clock.
 

crutschow

Joined Mar 14, 2008
34,407
........................

After considerable(I slept on it) decision making I've concluded I'll just stick an adder in after the counters and make the XOR gates think that it has one more pulse to make before it should cut the clock.
Sounds way more complicated then just using a FF to delay the signal from the XOR gates by one clock count count.
 

Thread Starter

Sparkst3r

Joined Sep 9, 2015
5
After some experimenting with the actual circuit I've found that the final pulse is there just incredibly brief. It was so brief I discounted it at first, prompting this thread, but I measured it to be around 30nS in length which makes sense as that is roughly all the propagation delays added together.
It also seems to be long enough to clock the 74194(I thought the ones I had were LS but they're just the standard variant) shift registers.
So all in all I fixed it in the end, mostly due to my misjudgement.
Thanks for all the suggestions!
 
Top