Thursday, December 30, 2010

Digital Clock based on 74ls90

Digital clock never get obsolete on digital electronic projects.

Many approach and design are available online but implementing it using 7490 decade counter is one of the easiest design. This can be proven by looking at its simplicity and compactness.

Check its datasheet to see it's pin configuration and how it's being implemented.

On our digital clock circuit. We will use divide-by 10, divide-by 6 and divide-by 2. This circuit design is not adjustable so you need to start the clock exactly 00:00 or 12am.

here's the circuit of 7490 to be used:

for SECONDS' ones, MINUTES' ones and HOURS' ones are divide by 10.

for SECONDS' tens and MINUTES' tens are divide by 6.

for HOURS' ones is divide by 2.

please refer to the diagram below for the appropriate circuit.



The output of the HOURS' tens digit is connected to an AND gate that will reset the counter to 00 when 12 is counted.

The clock source will depend on the designer. It can be a 60hz from the powerline, 555 astable mode, crystal oscillator or any oscillators.

here's the circuit:


Here's the simulation video using Proteus Isis 7 (Download proteus here):


Up/Down Counter Circuit

Counters are very common experiments on digital electronics subjects.

Here's a simple up/down counter that uses 74190.


This circuit is easy to implement and here are some of its features:

Presettable - having this capability, it is easy to use for down timers with initial value like 24second shot clock.
Parallel output(BCD) - its bcd output can be easily interface to a bcd-to-sevensegment decoders.
Ripple clock output - you can cascade many 74190 to form 2digit, 4digit and Xdigit counters.
Single input pin for up/down - in case that the requirement is to control the count in a single pin, this 74190 is very applicable.

Please note that you need a switch debouncer on the switch so that you can have a clean count..

Reference for switch debouncer.
http://circuitdesolator.blogspot.com/2010/12/switch-debounce-circuit.html







Simple magnitude comparator (7485 IC) Circuit

In designing logic circuit, it is sometimes necessary to compare values of two digital data. In this case, creating your own magnitude comparator can cause you more logic IC and can consume more time and money. This magnitude comparator IC might help you. It can compare two 4-bit data but can be cascaded to other magnitude comparator. It is the 7485 IC.

This 7485 magnitude comparator is one of my favorite logic ICs. This IC helped me a lot in my school projects specially on digital electronic games like chess, fight combat, etc. I usually use this chip in declaring the winner of having a higher score.

Here is a sample circuit.


A demo video of the magnitude comparator simulation using Proteus Isis 7 (Download Proteus here)




Wednesday, December 29, 2010

LED Dot Matrix Pin Configuration (pinouts)

Many students ask about the pin configuration of LED Dot Matrix.

So I posted here the commonly used LED matrix.

 7x5 LED Matrix


 8x5 LED Matrix


 8x8 LED Matrix



Enjoy working on your LED Matrix!

Tuesday, December 28, 2010

Jack en Poy or Rock-paper-scissors using C language

More that a year ago, I've created a C code demonstrating a game called jack en poy(Rock-paper-scissors).
I've written that code since those were the days that I am exploring C programming.

You can download my code here.

Jack en Poy in C

Terminal by bray(br@y++)

It's been a while since I play around UART communication between a microcontroller and PC's COM Port.I always use the Hyperterminal in Windows XP(Windows 7 doesn't have a default terminal application) but when I found the terminal created by bray. I find it better to use.

You can download it here.

Terminal by bray

Pull-up and Pull-Down Resistor

Most of the beginners in digital electronics assume that the hanging input is a logic 0. Then, that's a misconception. They are neutral state which can be a logic 0 or a logic 1. This will bring chaos on your circuit operation.

To solve this problem, we add a pull-up and a pull-down resistor.

Below is an image of pull-up and a pull-down.



As you can see, in each case there is a default input. For a pull-up, the default input to the logic IC is 1. And for the pull-down, the logic is 0. The resistor also provide a current limiting function thus affecting power consumption of the input section. 10kohms is the commonly value but any value can be use depending on your application.

Switch debounce circuit..

 In most digital electronics projects that uses different kinds of switches, switch bounces are commonly encountered. These are extra glitches after the real switch operation. These are tiny pulses that affect the actual operation of the circuit like counters.

Here's a demo video of a switch bounce.


It is clearly seen that in certain push on the switch, the counting is not accurate. This is causee by the switch bounce. Here now is the image that shows switch bounces and a clean pulse.



As you can see in the top image, this is an image of a clean pulse without a switch bounce. On the other hand, below it, shows the bounces formed from switching.

The upper image use a circuit that is called switch debounce. A switch debounce can be software or hardware. We will create the latter.

The circuit below is a RS latch that is used as a switch debouncer. It's composed by two 2-input NAND gates with outputs feedbacks to the input of another. (other explation from malvino)



Here is now a video of a counter with swich debouncer.