Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

Project Request

Return
christian lahoud
christian lahoud

posted on 2015/05/15 11:36:16 PM CEST

Timers (Real time clock)

pic16f877 timer

hi.
im having trouble with timers. i dont know how to call a timer and start it when i push a button or any input signal...
for example i want to turn on a relay if i push a buton but after a specified delay (like 5 sec). i want to do this in mikrobasic.
i need an example code plz!!
i know its a very simple code (for coders) but im a beginner in mikrobasic i have done this in basic...
thanks for any help.
best regards.

USER Comments

Anant Mitra
anantmitra

posted on 2015/05/26 08:42:45 AM CEST

ur push button must be connected to some input pin so write the code using the condition of this input pin either high or low.
e.g. if push button is connected to the portB.B1 then if (PORTB.B1==1){here u call ur timer function}

  • Rating:
0
No Abuse Reported

Do you want to report abuse comment ID: 1458 in "pic16f877 timer" request.