countdown timer using pic16f877a

Discussion in 'Embedded Systems and Microcontrollers' started by edski, Sep 29, 2010.

  1. edski

    Thread Starter Member

    Sep 22, 2010
    65
    0
    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!!
     
  2. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    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.
     
  3. edski

    Thread Starter Member

    Sep 22, 2010
    65
    0
    ok. i'l attach it again
     
  4. edski

    Thread Starter Member

    Sep 22, 2010
    65
    0
    where will i attach the image? because it is in proteus
     
  5. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    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.
     
  6. edski

    Thread Starter Member

    Sep 22, 2010
    65
    0
    i cant find the printscreen..where is it?
     
  7. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    Should be at the top right of your keyboard. Might say something like "Prt Scr" on it.
     
  8. edski

    Thread Starter Member

    Sep 22, 2010
    65
    0
    can u see it now?
     
  9. edski

    Thread Starter Member

    Sep 22, 2010
    65
    0
    hi mark, can u see it now?
     
  10. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    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.
     
Loading...