A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
Basically, has anyone ever tried to use PWM for position control on the PIC?
I am trying to program a PIC18F458 for position control using a quadrature encoder which
has 1600 "states" per revolution.
What i am have working so far is i give the PIC a reference position(in encoder counts)
that i want a motor driven to. I then have an algorithm that generates a smooth
accelerate, cruise, decelerate trajectory which i want to feed to a PID function that will
set the correct PWM duty cycle. I know the trajectory generator is working because i have
tested its output and the trajectory it lays out looks fine.
My issue is setting PWM duty cycle. I dont know exactly what value to set it at or if i
need any sort of conversion between position error and duty %. do i directly set the duty
cycle to the error between actual and desired position? I have just tried everything i can
think of and nothing is working.
any help will be greatly appreciated
thanks
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
______________________________
controlSUITE software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )