Need help programming an interval clock.


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2011
    Posts
    2

    Question Need help programming an interval clock.

    Hello guys!

    I'm using the 18 legged chip PIC16F84A

    Button 1 is RA.2
    Button 2 is RA.3
    Button 3 is RA.4
    Reset is on RB.1
    The Diode is on RB.0

    So I have 3 push buttons, 1 reset button and 1 diode.

    When I'm pressing the first button a timer should start counting to 15s and then the diode starts emitting light for a short period of time.

    Exactly the same thing should happen when I'm pressing button 2 and 3 except that the timer counts to 30s when I'm pressing the 2nd button and 45s when I'm pressing the 3rd.

    When the reset button is pushed the program should stop immidiately and go back to the start to await further commands.

    Thanks, Kuklarz.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Default Re: Need help programming an interval clock.

    Hi, Kuklartz

    I wonder ...

    is it some school homework ? or

    are you asking for a ready-to-use program + scheme + PCB drawing + copyright ...

    or do you just ask for pointers ...

    like use of the BUTTON command, PAUSE command, Interrupts or so ???

    One sure thing is : this program is not already downloadable from this site.


    So, What is your question about ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Need help programming an interval clock.

    What do you need help with? Does your program do anything? are you having compile errors? Do you just need the code written for you? Have you looked over the datasheet at least?
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  4. #4
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Need help programming an interval clock.

    HAHAHA Alain you beat me too it.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  5. #5
    Join Date
    May 2011
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Need help programming an interval clock.

    this is a schoolwork and me and my friend found some strange bugs in our surcuitboard. on our momentary pushbuttons there was some electricity leaking and we didnt get enough current to get an in-signal on our processor, we are currently debugging our grogram, we found out that there were some easy fixable problems and we are on track again.
    Thank you anyway, love Kuklarz

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts