|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Help needed timing a pulse (2004 Robovation)
Hi everyone,
I have been reading about CCP pins and interrupts, and am at a complete loss as to what the -simplest- way of timing an input pulse is. Here are the specifics of my application: -The signal varies from 1mS to 36.99mS -There is a 65mS low signal between pulses -I am currently using, essentially, the default code (added sensor capture and filtering for sonar, but the framework is the same). -It would be best if lag during capture could be avoided (so that the proc. doesn't wait for a signal when it could be filtering, etc.) -I will, obviously, need access to the up-to-date value as stored in a variable. -My PWM generator specifies down to 10uS readability; 100uS would be fine for my purposes. -The signal is 0V or 5V, through a sensor powered by the analog pins. Now, I know interrupts can be used like the sonar code, tracking rising and falling edges of the square wave. I also gather that CCP can do this with one pin, and appears like it will not lag the program. How can I impliment something like this? What code do I need to add to the default code? What pins do I use? Thank you, Josh |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HELP-URGENT PROGRAMMING HELP NEEDED | Rohith Surampudi | Lego Mindstorm Discussion | 1 | 24-03-2006 23:05 |
| Please Help: Programming the Robovation Kit | wmurphy | Robotics Education and Curriculum | 14 | 08-12-2004 12:57 |
| robovation KIT help | Mirza95vx | Technical Discussion | 2 | 03-12-2004 15:08 |
| 2004 WPI EBOT Competition (using Robovation robots) | ahecht | Off-Season Events | 3 | 04-11-2004 21:25 |
| PUlse counting | junkyarddawg | Technical Discussion | 1 | 31-01-2002 15:33 |