Morse Code Display Project

absf

Joined Dec 29, 2010
1,967
If you look at the table attached, you'll see that you LED would flash 3 times when counting down from "5" and it would flash 6 times when counting up.

In my circuit, the number you set on the DIP switch is not the pattern of the morse code. The pattern is set by the decoder and the gates after the decoder. Both the short and long signals are taken care of. May be my circuit is ahead of what you're doing presently. When you reach part 2 and part 3 of your exercise, then it would be useful.....

But still I think taking the output from Qa would not accomplish what you've intended to do.

Allen

absf

Joined Dec 29, 2010
1,967

This is a picture of my schematic diagram. Please take note of the changes below:

1. I have now connected S0 and S1 of 74194 (shift register) directly to the pushbutton.
2. Please ignore the words 'shift left' below as it was a misunderstanding of the 74194 datasheet and my project requirements. Sorry.

Thanks!
I redrawn your circuit using Proteus as below. But I have a hard time understanding how it works.

What's the purpose of the 2 D flip flops? Why the SR and SL of 74194 are left unconnected?
U8A is used as a NOT gate, together with U8B they form an AND gate, right?

Allen

glitzy_dust

Joined Mar 16, 2015
55
To MrChips:

Oh dear. I am a bit confused on what you are saying, but I think it should be fine. I think my teacher should have chosen the right voltage (5V) so that the correct current flows in the circuit.

Thank you for your reminder, and I will keep the above in mind when I design more/use digital circuits in the future.

glitzy_dust

Joined Mar 16, 2015
55
To absf:

If you look at the table attached, you'll see that you LED would flash 3 times when counting down from "5" and it would flash 6 times when counting up.
Oh dear. I think I may have overlooked this part. I always thought that the counter will count 5, 4, 3, 2, 1, flashing short burst 5 times before it hits 1 and stops. Just wondering, I thought the 74194 counter should stop counting when it hits 0, if I were to put a memory element, e.g. a JK FF on my board?

But still I think taking the output from Qa would not accomplish what you've intended to do.
Ah I see. I guess I'll have to use a decoder and some gates, like what you did above. ><

Thanks for helping me re-draw my circuit in Proteus!

What's the purpose of the 2 D flip flops? Why the SR and SL of 74194 are left unconnected?
The 2 D FF are my debouncing circuit for my pushbutton. Oh. Um. Must I connect SR and SL? By the way, CLR_BAR of 74194 is connected to HIGH if I'm not wrong - I have forgotten to draw it out. >< Sorry.

U8A is used as a NOT gate, together with U8B they form an AND gate, right?
Yes, U8A and U8B are used together to perform the functions of an AND gate, so that I save space on my breadboard. Haha. :x

glitzy_dust

Joined Mar 16, 2015
55
Sorry MrChips and absf for not being prompt in my replies as I have other projects to handle too and they are due really soon. Thank you once again for all your help.

absf

Joined Dec 29, 2010
1,967
No problem you can always come back here after you've finished your more urgent assignments.

I have put this thread on my watch list. I am on travelling to another town for a couple of days tomorrow.

Allen

glitzy_dust

Joined Mar 16, 2015
55
Thanks, absf. May I ask, for the schematic you have designed, does your dots and dash 'flash'/pulsate? This is because I tried using a 74138, and my LEDs (for short signals) do not pulsate/flash.

Actually, this is one of my more urgent assignments. Haha. :X

Thank you once again. Have a safe trip!

absf

Joined Dec 29, 2010
1,967

Sure,they all flash. Let's use code "1" dot-dash-dash-dash-dash as an example.

Code:
When output of 191  Q3-Q0  is 0000, output U2 Y0=low,
0001,               Y1=low,
0010,               Y2=low,
0011,               Y3=low,
0100,               Y4=low,
0101,               Y5=low,
0110,               Y6=ow,
0111,              Y7=low,
When Y1=low, U7A NOR pin 2 would be low. When the clock is high, output of U7A would be low and the "dot" LED would be off. When the clock turns low, o/p of U7A would be high and the LED would be on. If the duty cycle (on/off ratio) of your clock is too high, e.g. 90% ON and 10% off, then may be the LED would be lighted too briefly and your eye might not be able to see it flashes.

Another reason could be due to the output current sourced by the TTL is too weak. This would cause the LED to have not enough current to flash the LED. You can modify the display circuit as below and see if it works.

This is what Mr Chips was saying (see post #40) in his post about watching the current of the TTL chips. In TTL logic, it can sink more current (LED connected to Vcc) and it can source less current (LED connected to Ground).

Allen

Last edited:

absf

Joined Dec 29, 2010
1,967
To absf:
The 2 D FF are my debouncing circuit for my pushbutton. Oh. Um. Must I connect SR and SL? By the way, CLR_BAR of 74194 is connected to HIGH if I'm not wrong - I have forgotten to draw it out. >< Sorry.
I see!! 2 D flip flops to debounce one button switch? OK.

In TTL, if you left an input opened circuit, it would automatically taken as logic high by the chip.

Allen

MrChips

Joined Oct 2, 2009
24,982
This is what Mr Chips was saying (see post #40) in his post about watching the current of the TTL chips. In TTL logic, it can sink more current (LED connected to Vcc) and it can source less current (LED connected to Ground).
No. I was referring to the inputs of U1 being pulled down by 1kΩ resistors.
You have to change the pull-down resistors to 220Ω.

An alternative solution is to interchange the resistors and the DIP switches so that the resistors become pull-up resistors and the DIP switches present a logic LOW when closed.

glitzy_dust

Joined Mar 16, 2015
55
To absf:

I see. Oh! I see why now. You connected the clock to a gate! Haha. Then it will pulsate. I tried to connect the LED bulb directly to the 74138 decoder and I realised, oh, it doesn't have a clock so it won't pulsate. I was thinking of using a D FF to make the output of 74138 pulsate, however, I couldn't think of any. I went back to your map and realised that the missing piece of the puzzle was the use of a clock. >_<

I will reanalyse the 74138 again when I get back today from school.

I see!! 2 D flip flops to debounce one button switch? OK.
Yupp. I will show you a diagram of it later when I get home from school. Just wondering, is it possible to just use 1 D Flip flip to debounce a circuit?

In TTL, if you left an input opened circuit, it would automatically taken as logic high by the chip.
Oh dear. I will connect all the empty inputs where I want it to be in logic low. Thanks for sharing!

glitzy_dust

Joined Mar 16, 2015
55
To MrChips:

An alternative solution is to interchange the resistors and the DIP switches so that the resistors become pull-up resistors and the DIP switches present a logic LOW when closed.
I see. But if you were to change the resistors to pull-up resistors, do you still keep the 1kΩ resistors? I have never heard of pull-up/down resistors. I shall read up on them when I am done with my exams and clear all my deadlines. I've learnt something new here. Thank you!

glitzy_dust

Joined Mar 16, 2015
55
To absf:

May I ask, how does the MUX (74157) work in this case? I thought we have to feed the inputs of the DIP directly into the counter 74191, because the counter should count from the number we want it to start counting from.

I also foresee a problem. This is because when I choose to count up for numbers more than 5, (i.e. 6 to 9), the counter 74191 will not stop counting till it hits 15. >.< I was thinking, I should design a system of logic gates to overcome this, such that when the counter counts to 9, it stops counting further.:X

MrChips

Joined Oct 2, 2009
24,982
To MrChips:
I see. But if you were to change the resistors to pull-up resistors, do you still keep the 1kΩ resistors? I have never heard of pull-up/down resistors. I shall read up on them when I am done with my exams and clear all my deadlines. I've learnt something new here. Thank you!

There is a common need to apply a logic level voltage to the input of a digital circuit.

One way of doing this is with a Single Pole Double Throw (SPDT) switch as shown in figure (1).

For a miniature PCB mount slide or rocker switch, Single Pole Single Throw (SPST) switches are more readily available than SPDT. However the circuits shown in figure (2) and (3) do not work. Why?

That is because the input of a logic gate (particularly CMOS logic) has high impedance. There is no guarantee that an unconnected input (i.e. floating input) will assume a given logic state, either LOW or HIGH.

This is why you need either a pull-down resistor figure (4) or a pull-up resistor figure (5).

In order to determine the proper range of values for R4 or R5 one must consult the data sheet of the specific logic gate. One needs to know the logic low and logic high input currents and the logic low and logic high input threshold voltages.

A value of 100Ω will work for both R4 and R5 for both TTL and CMOS gates. However, this means that if the supply voltage is 5V then the resistor will draw 50mA when the switch is closed.

In figure (5) a pull-up resistor of 1kΩ will draw 5mA. You can safely increase the value of R5 to 4.7kΩ which will draw 1mA.

With CMOS gates, the pull-down or pull-up resistor can be as high as 100kΩ or even higher.

glitzy_dust

Joined Mar 16, 2015
55
Thank you Mr Chips for the introduction to the different switch types. I shall read them after my exams.

Sorry for not updating here as I was really busy with things in school and other work. Anyways, I have managed to successfully build the Morse Code system, but only for numbers 1 to 5. I will upload my schematic here later. Please pardon me for the messiness as it is the first time I can drawing a schematic diagram in my life. Haha.

Thanks for all your guidance, especially absf, your JKFF circuit really saved the day.

glitzy_dust

Joined Mar 16, 2015
55
Hi everyone! Here is my working schematic for my project on the Morse Code. Thanks you so much for all your help in making my project a success, especially, absf. I apologise for the poorly done schematic (I drew the schematic on Proteus. ), as I think this is the messiest schematic diagram ever seen in the AllAboutCircuits forum.. Here goes:

My teacher commented that the ground on my DIP switch may be placed wrongly (he didn't tell me the answer though... :X). I know the LEDs are not grounded, so that is kind of a mistake, but you can assume that the LEDs are grounded. If you want to see the real circuit, you can post here and I will post a video after my exams in end-April.

Thanks a lot for everyone who has helped me in one way or another! ^^

MrChips

Joined Oct 2, 2009
24,982
Your teacher is correct. Go back and study post #54.