View Single Post
  #9   Spotlight this post!  
Unread 05-02-2006, 21:31
Mike Bortfeldt Mike Bortfeldt is offline
Registered User
FRC #1126 (& 1511)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Rochester, NY
Posts: 119
Mike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud of
Re: ADC code effecting motor outs???

Kyveck,

If you still want to use PWMs 13-16, you can try this piece of code (hopefully this is the working version...). It replaces the Generate_Pwms function call and utilizes Timer 3 and the CCP modules to control the pwm 13-16 pulse width. Since the pulse is controlled by hardware, it should be independent of other interrupts. My team was planning on using PWM 13, 15 & 16 this year in order to improve the Victor response time since PWMs 1-12 seem to put around a 50 millisecond delay between setting the pwm output variable and for the Victor to respond (communication to the master processor plus some other delay). But based on the recent comments I've read on CD, having a jittery PWM output would not be unacceptable.

I have not had a chance to do any extensive testing on this code other than a quick check to be sure that it is indeed generating a 1-2 millisecond pulse, so it may still have some bugs. I plan on running more tests over the next week but if you decide to use it and have any questions or problems, let me know.

Mike
Attached Files
File Type: zip User_PWMs.zip (2.4 KB, 76 views)