Countdown Timer programming help (pic16f628)

Discussion in 'Programmer's Corner' started by eng.aymanaly, Aug 5, 2009.

  1. eng.aymanaly

    Thread Starter New Member

    Jul 24, 2009
    Hi all.....I've built the countdown timer in this site and modified it a little bit to work with 4" and 2.3" displays.

    But I want to add 2 new press buttons (while keeping the original buttons in the schematic as they are) one to set the timer to 15 mins and the second to set it to 30 mins then the timer should starts to countdown imediately and when reachs 5 mins activate the relay on RB5 (instead of it being on all time)

    I don't know how to modify the code to do that, so your help will be so much appreciated :)

    PS. we can use the internal oscillator and use the 2 pins to be I/O for the new buttons

    thanks in advance
  2. eblc1388

    Senior Member

    Nov 28, 2008
    You can add the buttons as shown.

    Without reading the source code I can't help you with the coding change though.

    What you should do is to detect if S4 or S5 is pressed first before jumping to the original S1, S2 and S3 key detection/handling routine.