HI
You need use timer pic as counter pulse and define period to size speed take value timers, next set timer0H timer0L = 0
and need sync the crozing 0 phase when do this start delay no more to .01s -- min 0s in all phase @50hz
Cuantify the desviation setpoint seed with real speed and subtract
this = error speed desviation, make scaling
need make a pwm inverse for make angle start phase, is very diferent to pwm and hpwm normality used in CD
control ( is more easy use DC and igbt,or power mosfet, to control, speed )
the change increments in AC is no Linear is senoidal, need make a funtion to iguality increments to keep
lineality numeric changes
when you using triacs with motors brushed ther is very much noise in the brush, some times the microcontrollers
no run well, veri erratic operation.
see this links:
http://www.picbasic.org/forum/printthread.php?t=4199http://list.picbasic.com/forum/messages/6851/6860.html?1073315426http://www.picbasic.org/forum/showthread.php?t=4792 best regards