View Single Post
  #2   Spotlight this post!  
Unread 24-10-2006, 22:45
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,673
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Help needed timing a pulse (2004 Robovation)

Yes, you can use a single CCP module to do this, but it would still create an interrupt you'd have to service, and you'd have to constantly change the mode of the CCP module. So you may not actually gain anything. You could also use 2 CCP modules with a lighter interrupt service rountine, or no interrupt service routine and some educated guessing if your data is valid. In fact, you could also use just one interrupt in the same fashion you'd use just one CCP module. Sadly, I see no real way of doing this without some amount of interrupts. Unless you're fine with making an (very well) educated guess about the validity of your data.

Sooo..... The question would be exactly how much help you're looking for. All the info you actually need is in the data sheet, pages 149-151. And in the Edu-bot programming reference, to put the PWM outs into USER_CCP mode. If you want, I can whip out very rough pseudo code for the scenarios about so you can see the differences.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter