PDA

View Full Version : Need help programming an interval clock.



Kuklarz
- 11th May 2011, 14:09
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.

Acetronics2
- 11th May 2011, 14:21
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

cncmachineguy
- 11th May 2011, 14:27
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?

cncmachineguy
- 11th May 2011, 14:28
HAHAHA Alain you beat me too it. :)

Kuklarz
- 11th May 2011, 20:14
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