Hi all,
To begin to understand the function capture of the timer 1, I would at every rising edge on pin CCP1, my variable is incremented.
I will post the beginning of pragramme but never increment the counter.
Someone could help me.
Steve
Capture on CCP1
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
Re: Capture on CCP1
Hi
I have tried couple of months back the capture function and can't mange to sort that. Not was quite sure why but will have a look again and let you know.
I have tried couple of months back the capture function and can't mange to sort that. Not was quite sure why but will have a look again and let you know.
Re: Capture on CCP1
It's good, it works.
I made a syntax error when the macro "capture" is called.
The problem is fixed and it works well as a pulse counter.


The problem is fixed and it works well as a pulse counter.
- Attachments
-
- tmr1 CCP1 capture.fcf
- (14 KiB) Downloaded 342 times
-
- Posts: 18
- Joined: Wed Jan 23, 2013 7:07 pm
- Has thanked: 6 times
- Been thanked: 2 times
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Capture on CCP1
I have done that for you in this post:ProtonLaser wrote:Yes but hae you tried capturing the timer value???
http://www.matrixmultimedia.com/mmforum ... 052#p46225
Martin
Martin
-
- Posts: 18
- Joined: Wed Jan 23, 2013 7:07 pm
- Has thanked: 6 times
- Been thanked: 2 times
Re: Capture on CCP1
Hi Martin,
Yes i tryed it and it did not capture the timers values.
**Tryed the version you proposed, worked great!!
Thank you again Martin for giving a solution!!
I will give the timer option again and come back.
Abel
Yes i tryed it and it did not capture the timers values.
**Tryed the version you proposed, worked great!!
Thank you again Martin for giving a solution!!
I will give the timer option again and come back.
Abel