[sdiy] simple TTL programmable counter question (74LS163)
Michael Buchstaller
buchi at takeonetech.de
Sun Oct 26 17:36:38 CET 2003
Hello friends,
i could run up the wall and bang my head against it !
Since 2 days now i am trying to make a simple programmable
oscillator circuit to drive a wavetable in an EPROM with it.
The idea is: I take a high frequency oscillator (100 MHz in the final
poject, 16 MHz in my bench project so i can see the signals on my
Oscope).
Tis is followed by 4 74LS163 (later 74F163) asynchromous counters,
the lowest bit of the last one being used as an output.
Free-running, this will divide the oscillator frequency by 65536, also
give roughly 244 Hz.
So far, this works.
But, i want to be able to program other frequencies.
Now, i set the "programming" inputs of the 74LS163 (pins 3...6)
via a bank of DIP switches and pullup resistors to some value.
I want to take the Overflow (pin 15) on it´s falling edge to cause that
the values from the DIP switches will be written to the ´163, so they
will count up from that value instead run until 0 and over.
(Say, i want 128 KHz, so i will have to divide the 16 MHz down by a factor
of 125, so i will set the switches to 65536-126 = 65411. I would expect the
circuit to overflow, then set back to 65411 and count upwards to the next
overflow, and so on)
Looking at the last counter´s output, a signal is there at pin 15.
I feed that into an 47121 Monoflop to stretch out the pulse width to some
length and get a defined pulse from the low-going edge of the signal.
This works, too. I get a fine 1 uS negative pulse every time the input
overflow goes down to L state.
Now, i feed this pulse to all pin "9" of the 74LS163, but nothing happens.
Still 244 Hz at the output, but a bit "wiggly" on the scope.
If i tie the pin "9" hard to +5V, the 244 Hz is rock stable.
If i tie pin 9 to GND, the output halts, and all counter outputs show the values that
i have dialed in with the DIP switches.
So far, everything works, all IC´s have proper power and are functioning OK.
But why the heck does it never count up from those programmed values ?
Am i overlooking something here ? If Yes, WHAT ????
All IC´s are properly decoupled with a separate 47 nF ceramic cap, +5V is OK,
every input and output triple-checked.
74LS163 pin connections:
01 - +5V (/Clear)
02 - Oscillator on the 1st chip, to Pin 15 of the foregoing one on the next chips (Clock)
03 - Pullup 33K to +5V, DIP switch to GND (Data bit 0)
04 - Pullup 33K to +5V, DIP switch to GND (Data bit 1)
05 - Pullup 33K to +5V, DIP switch to GND (Data bit 2)
06 - Pullup 33K to +5V, DIP switch to GND (Data bit 3)
07 - +5V (Enable)
08 - GND (Power GND)
09 - connected together with all `163, and then controlled from the monostable /Q output (/Set)
10 - +5V (Enable)
11 - unused (Output bit 0)
12 - unused (Output bit 1)
13 - unused (Output bit 2)
14 - unused (Output bit 3)
15 - goes to the next `163 pin 2. Last `163 uses this to drive the monostable (Overflow)
16 - +5V (Power Vcc)
74121 pin connections:
01 - Drives the Pin9 of the ´163 (/Q Output)
02 - n.c.
03 - +5V (A1 input)
04 - Overflow from the last ´163 (A2 input)
05 - +5V (B input)
06 - unused (Output Q)
07 - GND (power GND)
08 - n.c.
09 - unused (internal R)
10 - capacitor to pin 11 33 nF (later 100 pF)
11 - resistor to +5V 2.2K
12 - n.c.
13 - n.c.
14 - +5V (Power Vcc)
Please !!!
What am i doing wrong here ??
I am sooooo confused now...
Thank you all !
-Michael Buchstaller
More information about the Synth-diy
mailing list