hello forum!
Any help will be apreciated, I new to pic programming, and do not know where to start,
a code sample will be apreciated.
I can modify it and compleate the program if you give a code sample for this particular PIC
I been trying other code samples but they are too generic and could not made them work.
Here is my project: using a pic16F628A.
I need to write a program to do the following:
1.- Store in memory a number between 1-256 and remain safe in memory even when no power,
and using PORTB.0 increase it by one every time I push a button, and DEcrease it by pushing another buttom at PORTB.7
This update should be available only for a few seconds after first powering the circuit
and the NEW number should remain safe even if no power.
Here is the challenging part:
at all times AND AT THE SAME TIME I need to TURN ON a led conected to those PORTB.0 and PORTB.7
(because of the visual effect the LED don't have to be ON while readding the button to apear lighted)
after a few seconds of not pressing those buttons to update the number, the program will go to the next phase,
and the number CAN NOT be access antil circuit is power OFF and back ON
2.- the number stored in the NON volatil memory (explained in step 1) will represent minutes.
withOUT the use of any external timing components.
A rutine will COUNT DOWN secons and minutes until ZERO time is reach.
while time still left a logical high signal (+5V) is needed to be present at PORTA.1
and finally
3.- AT ANY TIME WITH OR WITHOUT TIME LEFT, A logical LOW signal (0v) at PORTA.2
will reset the count down to start all over again from the begining.
Bookmarks