logic error, please help
I'm debugging the attached program. The scope shows my clock pin and enable pins are working correctly. The scope also shows that I'm not getting a bit-stream out of my data-out pin. The enable pin stays low for a time proportional to the number of bits I'm shifting out. The receiving chip is designed to latch-in the sent data bit on a low to high transition of the clock pin. The clock is currently set at 10 Hz.
spin

6K
Comments
If you look at the code for SYNTH, you'll see that it just sets up one of the counters to run on its own, then returns to the caller. You could just as easily put the call to Freq.Synth in place of the COGNEW in your main method.
LBIT shifts its parameter So, but that's a parameter that gets thrown away when LBIT returns. Sob in SHIFTOUT never gets changed.
You could make LBIT work like this:
and in SHIFTOUT, you'd have
Sob := LBIT(Sob) 'Load One Bit per loop. We don't care (yet) if clk pin is low or high.
You could also just build LBIT into SHIFTOUT rather than moving it into a separate method. It's only called once in SHIFTOUT and it's short.
Thanks a bunch,
Stan
P.S. Hardware was good. Had to massage the numbers and edit the code. I've got it displaying 4 digits on an LED display. With the long wires on my breadboard it can handle a clock rate of just over 8000 Hz. (fast enough for my needs)