Quote:
|
Originally Posted by Alan Anderson
It makes sense to call Process_Data_From_Local_IO() inside the while loop but outside the if (statusflag.NEW_SPI_DATA) block. But you should not be calling Generate_Pwms() in the fast loop -- the PIC PWM outputs get a little squirrely if you write to them too quickly.
|
See page 18 of:
http://www.innovationfirst.com/FIRST...10-29-2003.pdf
on IFI's website. In particular, you see that PutData() will handle PWMs 1-12, (slow PWMs) and those can only be changed every 26ms. While 13-16 are the fast PWMs that can be changed more often (every 2 ms).
IFI's website is very clear that PutData and Generate_Pwms(13-16) can be called as quickly as possible, but G_Pwms is the only thing that generates those PWMs that quickly. It warns that devices connected to the PWM outputs may have trouble with the fast changing PWM outputs and to check those device specifications, but there's nothing about the RC that makes this a bad idea.
After all, aren't Putdata and Generate_Pwms called in the default fast routines anyway?