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
- Contact:
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.
-
- Posts: 36
- Joined: Mon Mar 12, 2012 9:14 pm
- Has thanked: 5 times
- Been thanked: 7 times
- Contact:
Re: Capture on CCP1
Yes, it must be a bad command. I can not find it. Precision, I use a 16F876A.
Steve
Steve
-
- Posts: 36
- Joined: Mon Mar 12, 2012 9:14 pm
- Has thanked: 5 times
- Been thanked: 7 times
- Contact:
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 307 times
-
- Posts: 18
- Joined: Wed Jan 23, 2013 7:07 pm
- Has thanked: 6 times
- Been thanked: 2 times
- Contact:
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
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
- Contact:
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