My circuit has a stepper motor controller/driver that requires a pulse for each step. The speed has to be ramped but is otherwise constant for long periods of time. I want to avoid using an interrupt as it will fire every 1 to 20 ms. I'm shooting for a nice deterministic main loop...
The PWM frequency options look to be too coarse and too fast.
I didn't see a way to set the Compare function so that it would both reset the timer and toggle the CCP pin.
Any ideas?
Greg
Greg_R
Joined: 21 Feb 2006 Posts: 19 Location: San Diego
Additional Details
Posted: Tue Nov 28, 2006 7:05 pm
10Mhz Crystal with 4xPLL
Design is not in layout yet so any pin can be made available.
Greg
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
Posted: Tue Nov 28, 2006 9:51 pm
Try googling "numerically controlled oscillator". I did one on a 20MHz 16C58 PIC that went up to 35kHz. _________________ The search for better is endless. Instead simply find very good and get the job done.
Greg_R
Joined: 21 Feb 2006 Posts: 19 Location: San Diego
Just need a pulse without using an interrupt...
Posted: Tue Nov 28, 2006 10:06 pm
SherpaDoug,
Thanks for the suggestion but unless I missed something it doesn't answer the question. I'm simply looking for ways to avoid using an interrupt. Everything else the circuit needs to do will fit into a simple task schedule.
Greg
Greg_R
Joined: 21 Feb 2006 Posts: 19 Location: San Diego
dsPIC solved the problem
Posted: Tue Dec 19, 2006 4:35 pm
Turns out the compare modules on the dsPIC33s will do exactly what I need. Good thing the system also has one of them...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum