countdown timer using pic16f877a

Thread Starter

edski

Joined Sep 22, 2010
65
can anyone help me?
im trying to build a countdown timer using the assembly language

requirements:
1. 1 seven segment for the minutes and 2 seven segment for the seconds
2. the maximum time will be 9:59
3. there are 4 switches for the input. which accepts time in "minute"
ex: 5 minutes, 8 minutes..
4. a RESET button, that when pressed, the count will stop.
5. an LED will turn on when the count reaches 0:00

the circuit is attached... i appreciate your kindness!!
 

Markd77

Joined Sep 7, 2009
2,806
Can't see the circuit.
To simplify things I'd recommend a file for each digit which just stores 0-9 or 0-5.
We need to see the circuit to help more.
 

Markd77

Joined Sep 7, 2009
2,806
Get it on screen, press the printscreen button, open Paint and paste it there. Then crop and save.
You have to "go advanced" to attach an image with the paperclip icon.
 

Markd77

Joined Sep 7, 2009
2,806
Yes, it's a little small but can see the general idea. You will need resistors on all the LED segments - probably around 560 ohms. Check that this isn't going to exceed the maximum current for the PIC.
You can get delay routines here:
http://www.piclist.com/tecHREF/piclist/codegen/delay.htm

Probably the simplest (not the best) way is to have 20 delays of 50ms per second and to check the switches in between.
 
Top