Morse Code Display Project

Thread Starter

glitzy_dust

Joined Mar 16, 2015
55
Update on project:

Everything seems fine, so I think I did not connect CLR_BAR of 74194 to HIGH. Sorry. ><

Now, I just need to find a way to stop the 74191 counter from counting when count reaches 0, as I am counting down for numbers (from the DIP switch) which are less than 5, including 5.

Thanks! :)
 

absf

Joined Dec 29, 2010
1,964
You can stop the 74191 from counting when it reaches zero by a D or JK flip flop connected like attached.

TC of 74191 will be "high" for a short while when zero during counting down and also when it reaches 1111 when counting up.

AllenMORSECODE CROP.PNG
 

Thread Starter

glitzy_dust

Joined Mar 16, 2015
55
I see. Thank you for your help! :) I will take a look and try to understand the working of your setup before I implement it in my circuit. :) I shall do this later today as it is 0119 here in SGP. ><

Just wondering, when I asked you this question, what thought processes went through your mind? Do you think of the outputs, and try to 'play around' (i.e. mix and match) possible inputs to achieve the desired outcome?

I am really interested in the thought process, and I think if I can think clearly like you, designing digital circuits will be easier for me. :)

Thank you so much for your help. :D
 

djsfantasi

Joined Apr 11, 2010
7,930
One thing I did not see in your schematic, is a current limiting resistor for each LED. It looks like they are there on your picture - but it also seems some are missing.

Also, do you have bypass capacitors on each IC? Its highly recommended, to avoid switching noise to disrupt operation. Here is an article on this site that describes their use.
 

absf

Joined Dec 29, 2010
1,964
Just wondering, when I asked you this question, what thought processes went through your mind? Do you think of the outputs, and try to 'play around' (i.e. mix and match) possible inputs to achieve the desired outcome?

I am really interested in the thought process, and I think if I can think clearly like you, designing digital circuits will be easier for me. :)
Well, I think this all based on experience. How many TTL chips have you used before and and how familiar are you with them. Once you have a simulator, you can choose a logic by its function. Then you can look up the datasheet to learn how to use it. This is how I learned how to use 74191 and 7485.

I found this exercise you did is quite tough to design using discrete logic gates. Unless you're allowed to use a programmable device like PROM or EPROM; it would make life much easier.

I have done this before using a PIC 12F629 just sending "SOS" in morse code to a speaker using just a transistor driver.

But using TTL...... I have to crack my head.:rolleyes:

I have succeeded sending just M codes for "1" and "6" using your circuit. But I need more time to do the rest. I'll upload my circuit when it it ready.

Allen
 
Last edited:

absf

Joined Dec 29, 2010
1,964
OK here's my schematic for implementing M. code "1" & "6". Not perfect but it works. Still have plenty of rooms for improvement.

U1 MUX is used to set initial numbers for counting UP or DOWN. For UP it is "0" and for DOWN it is "9".

Allen

MORSECODE.PNG
 
Last edited:

Thread Starter

glitzy_dust

Joined Mar 16, 2015
55
To absf: I see. I only started learning TTL chips (e.g. the 74HC/LS family mainly) recently, for about 10+ weeks, so I guess the concept of TTL chips is quite new to me. Oh ya, what did you mean by "choose a logic by its function"?

Oh. Yes! Simulator! I think a simulator really helps a lot as one can easily use the 'guess-and-check' method and see if the output from a combination of chips makes sense, saving time on cutting wires to do breadboarding. :) Do you have a simulator which you can recommend me? I would prefer free software, especially with a graphical user interface, because I can't afford the commercial ones which are expensive, and graphics help me visualise better.

Oh no, unfortunately, we are not allowed to use any programming, only pure TTL chips. ><

I have done this using a PIC 12F629 just sending "SOS" in morse code to a speaker using just a transistor driver.
Wow cool! I will look this up during the holidays as time is running out for me - the project is due in 2 weeks' time. :(

I have succeeded sending just M codes for "1" and "6" using your circuit. But I need more time to do the rest. I'll upload my circuit when it it ready.
I see. That's great! Thanks! This means my design works at the very least, and the weeks I put into this project did not go to waste. :D
May I know, what does "M codes" mean?

Thanks a lot for your guidance. :)
 

Thread Starter

glitzy_dust

Joined Mar 16, 2015
55
To djsfantasi:

One thing I did not see in your schematic, is a current limiting resistor for each LED. It looks like they are there on your picture - but it also seems some are missing.
Yupp, I do resistors usually for my LEDs, unless I have no space on the breadboard. >< Thanks for pointing it out. :D

Also, do you have bypass capacitors on each IC? Its highly recommended, to avoid switching noise to disrupt operation. Here is an articleon this site that describes their use.
Oh nope. I heard there are built-in capacitors in the IC chips I use.. :X But I'm not very sure. Is that true? :)

Thank you for your help. :D
 
Last edited:

Thread Starter

glitzy_dust

Joined Mar 16, 2015
55
To absf: Thank you for your schematic diagram! :)

U1 MUX is used to set initial numbers for counting UP or DOWN. For UP it is "0" and for DOWN it is "9"
Just wondering, is it possible for me to still count up/down, without the use of a MUX? I was thinking of relying on Pin 7 of 7485 comparator (A<B out) and feeding it into D/U_BAR port of 74191 up/down counter so that 74191 counts up and down as desired.

Thank you once again. :)
 

absf

Joined Dec 29, 2010
1,964
what did you mean by "choose a logic by its function"?
When you're using simulator like "Proteus". You select a device, and then you just type "counter" on the search window; a list of devices with the counter functions will appear on the list. Then you just select one of the parts with the function you want and double click on the part and it would be loaded into the active selected list in your schematic drawing.

e.g. when I type the word "counter" and also selected "74LS" family, lots of counters like 74LS90, LS92, LS93, LS161, LS162, LS163, LS191, LS192, LS193 etc would appeared there for me to select from.;)

Do you have a simulator which you can recommend me? I would prefer free software, especially with a graphical user interface, because I can't afford the commercial ones which are expensive, and graphics help me visualise better.
Personally I like "Proteus". Though it is not free. It does have a free demo version that you can download from "Labcenters.com". You can do a search using the search function on AAC with the word "circuit simulator" and see what other members here recommend. :)

May I know, what does "M codes" mean?
Cant you just make a guess? Clue --- it's in your post title:cool::D

Allen
 

absf

Joined Dec 29, 2010
1,964
To absf: Thank you for your schematic diagram! :)

Just wondering, is it possible for me to still count up/down, without the use of a MUX? I was thinking of relying on Pin 7 of 7485 comparator (A<B out) and feeding it into D/U_BAR port of 74191 up/down counter so that 74191 counts up and down as desired.

Thank you once again. :)
That's totally up to you. Because 74191 is a binary counter (ie it would count up 0-15 and down 15-0) so if you dont limit it to 0 and 9, it would be counting from 15 down and the M code would appear after 2.5 seconds assumming you're using 2 Hz clock.

This is a digital design exercise, what you can do is only limited by your imagination and knowledge.

Allen
 

djsfantasi

Joined Apr 11, 2010
7,930
Oh nope. I heard there are built-in capacitors in the IC chips I use.. :X But I'm not very sure. Is that true? :)
Oh nope. I've never heard of built in bypass capacitors in the IC chips, for the family of logic chips you're using. You used to be (still can?) buy chip sockets with a built in capacitor.
Capture.PNG
Adding a capacitor into the chip would be expensive and wouldn't be very effective because they would be too small. So we get to add them in our circuits.
Capture2.png
 

absf

Joined Dec 29, 2010
1,964
Here is an improvement of my last schematic after reading djsfantasi's post #12.

MORSECODE 1A.PNG
As I could not find 4 input AND gate in my simulator, so I use 4-input NAND and inverter combination.

I am sure the decode stage is not needed. It should be able to send all the codes from 0-9 just using gates design. But I have not figured out how to do it. I am sure it would be a piece of cake for the more advanced members here in AAC.

Allen
 

Thread Starter

glitzy_dust

Joined Mar 16, 2015
55
To absf:
When you're using simulator like "Proteus". You select a device, and then you just type "counter" on the search window; a list of devices with the counter functions will appear on the list. Then you just select one of the parts with the function you want and double click on the part and it would be loaded into the active selected list in your schematic drawing.

e.g. when I type the word "counter" and also selected "74LS" family, lots of counters like 74LS90, LS92, LS93, LS161, LS162, LS163, LS191, LS192, LS193 etc would appeared there for me to select from.;)
I see. Thank you! I shall search the forum for more circuit simulators when I have the time. I guess I shall use Proteus for now. :)

Cant you just make a guess? Clue --- it's in your post title:cool::D
Oh! Morse Code! >< Sorry. I thought M was like an algebraic variable. :X

That's totally up to you. Because 74191 is a binary counter (ie it would count up 0-15 and down 15-0) so if you dont limit it to 0 and 9, it would be counting from 15 down and the M code would appear after 2.5 seconds assumming you're using 2 Hz clock.
I see. Hmm.. That's true, but I am using LOAD_BAR of 74191 counter, so whenever I press the pushbutton, 74191 will be loaded with the number from the DIP switch and thus it will start counting up/down from the number I loaded into the chip. Am I right to say this? I need to double confirm my interpretation of the datasheet in case I interpret it wrongly.

I am using a 555 timer as my clock in the circuit. :)
 

Thread Starter

glitzy_dust

Joined Mar 16, 2015
55
To djsfantasi:

I see. Hmm. Maybe I heard my friend wrongly then. Haha. Oh dear.

Adding a capacitor into the chip would be expensive and wouldn't be very effective because they would be too small. So we get to add them in our circuits.
What you have said sounds true, because given the small size of the chip, we will not be able to get enough space between the plates to get good capacitance, leading to limited capacitance if a capacitor were to be built into the chip.

The chip sockets with capacitor sounds interesting! :)
 

Thread Starter

glitzy_dust

Joined Mar 16, 2015
55
To absf:

I am sure the decode stage is not needed. It should be able to send all the codes from 0-9 just using gates design.
At the moment, I am doing only short signals from 0 to 5, so I put an LED at Qa of 74191. May I know if this is okay? I will have to do numbers 6 to 9 in the future, so I will study and take down of your design. :)

I have never thought of 74138. Is it called a decoder chip? Cool! I think I can use that later in my project. :D

It should be able to send all the codes from 0-9 just using gates design..
I heard my friends use logic gates to split the signals into long and short, but if a single chip can do it, it is great too! I am only given 2 breadboards to work with and the voltage regulator, 555 timers, 7485, 74191, pushbutton and the debouncing circuit has already taken up one breadboard of space. ><

Ah! I see that you 'gated' the clock outputs. This sounds very familiar cos my friend was also saying that he can gate the outputs of the clock split the long and short signals (into 2 LEDs). :D
 

absf

Joined Dec 29, 2010
1,964
I see. Hmm.. That's true, but I am using LOAD_BAR of 74191 counter, so whenever I press the pushbutton, 74191 will be loaded with the number from the DIP switch and thus it will start counting up/down from the number I loaded into the chip. Am I right to say this? I need to double confirm my interpretation of the datasheet in case I interpret it wrongly.
In my circuit it would not be true.

Lets say you set the DIP to "0101" or "5" and when you load_bar is low, the counter would load "5" and count down from 5-0, and count up from 5-15. On the counting down there are 5 steps but on counting up, there are 10 steps. So how are you going to arrange the morse code patterns.

Unless your present circuit design using shift register and is completely different from your first design, it would be a different story.

If you just use "Qa" as output, the output would alternate between 0 & 1 (dot-dash) for every clock pulse. How are you going to get the pattern like dot-dash-dash-dash-dash from it?

Show us your latest circuit so we can comment on it...

Allen
 

Thread Starter

glitzy_dust

Joined Mar 16, 2015
55
To absf:

I see.
Show us your latest circuit so we can comment on it...
Currently, my circuit is still the same as the one I have hand-drawn and uploaded in a previous post. I will upload it again. :)

Unless your present circuit design using shift register and is completely different from your first design, it would be a different story.
I used a 74194 4-bit universal shift register to read in and pass out settings from my DIP switch.

If you just use "Qa" as output, the output would alternate between 0 & 1 (dot-dash) for every clock pulse. How are you going to get the pattern like dot-dash-dash-dash-dash from it?
Yupp. For 0-5, I observed from my question paper, that when the DIP switch is set to 4, for example, there will be 4 short pulses, which means it counts down 4, 3, 2, 1, 0, flashing out 4 short pulses in the process. Am I right to say this?

Lets say you set the DIP to "0101" or "5" and when you load_bar is low, the counter would load "5" and count down from 5-0, and count up from 5-15. On the counting down there are 5 steps but on counting up, there are 10 steps. So how are you going to arrange the morse code patterns.
I see. I was thinking if I set 74191 counter to count down, once it hits 0, it should stop (provided I add a JK flip flop as you have suggested previously).

Thanks! :)
 

Thread Starter

glitzy_dust

Joined Mar 16, 2015
55

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! :)
 

MrChips

Joined Oct 2, 2009
24,635
Pay attention to the Low-level input current (IIL) of 7400 and 74LS00 series logic.
For 74LS IIL is -0.4mA and -1.6mA for 7400 series gates. (Check the datasheets.)

If you are using resistors for pull-down on the 74194 inputs then 1kΩ resistors are too high.
If you want to pull the input voltage down below 0.4V, the required resistor is 0.4V/IIL.

1kΩ is barely low enough for 74LS194. You need 220Ω or lower for 74194.
It would be better to use 1kΩ pullup resistors and use the DIP switches for pull-down.

 
Top