Please help with sample code on 12f675
Hello.
I have a pic 12F675.
I want to store in memory time while a port is high.
Ex. GPIO.0 is in low. He's going in high and wait until it goes again low. I want to know how much time passed and save in memory.
Time must be between 5 and 15 seconds. If it is more, chooses the maximum value. If it is less, the minimum value.
Thanks.
Re: Please help with sample code on 12f675
Re: Please help with sample code on 12f675
Quote:
Originally Posted by
Acetronics
Hehe - that made me laugh! :)
Re: Please help with sample code on 12f675
thats a real real basic program, you can just do a loop to monitor the pin , as soon as pin goes high, change to second loop, use a pause and count, store variable, if you wanted to you could have another pin blink a led to display the seconds count wait a bit then repeat. you should be able to build the code from the manual or samples page using blink led program and loop sample.