4-bit decade and binary counter troubleshooting

Hello,
I am trying to learn more about flip flops and I got myself some SN74LS393 to divide a frequency since I saw this is possible to do and it looks interesting.

I have tried outputting an Arduino PWM signal (digital pin 3) onto one of the input pins (2A) of the SN74LS393 and was expecting to get the frequency divided on the 2QA,2QB,2QC,2QD outputs, but I am getting the same frequency as on the input... ( on the picture the scope probe is on the wrong pin)

Here is the datasheet:
sn54ls393-sp (1).pdf (1.8 MB)

the Arduino code is just the following:

void setup() {
pinMode(3, OUTPUT);
analogWrite(3, 60);
}

void loop() {
  // put your main code here, to run repeatedly:

}

Please post a schematic. Probably, there are more inputs to the 393 that need to be connected to something.

image
These are all the connections I made. I have been looking in the datasheet and online and didn't find anything more...

You probably can't leave the CLR pins floating...

1 Like

Yes, you are totally correct. It is working perfectly now. The 2CLR pin had to be connected to ground... Thank you very much!

1 Like

These are TTL, unconnected inputs are high, due to the input bias current.

Good point, and if you want to tie them high, you should do it through a resistor not a wire. Else power supply spikes can destroy the inputs.

Wisdom that won't matter when all the stocks of LS logic are gone soon.

OK to learn on - sort of :crazy_face: - but you definitely would not use such an obsolete IC in an actual project. :grin:

As long as you did not waste more than 50 cents on them. :roll_eyes:

Probably the capacitive coupling between the clock and MR pin is enough to pull the MR LOW shortly allowing for 0 to 1 transition of the count. When the clock returns HIGH the MR goes HIGH too resetting the count back to 0. Thus measuring LSB of the count gives the same frequency as the clock.

I do not think that the small value of capacitive coupling between pins will cause trouble because with TTL logic we must pull current out of a pin for it to register as a low.

1 Like

I forget whether anyone mentioned it, but there is no bypass cap on the IC.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.