dotit
MOVB #$04, PWMPRCLK ;ClockA=Fbus/2**4=24MHz/16=1.5MHz
MOVB #125, PWMSCLA ;ClockSA=1.5MHz/2x125=1.5Mhz/250=6000Hz
MOVB #$10, PWMCLK ;Use clockSA for chan 4 PWM
MOVB #$10,PWMPOL ;High then low for polarity
MOVB #$0,PWMCAE ;Left aligned
MOVB #$0, PWMCTL ;Co n c a t
MOVB #120, PWMPER4 ;PWM_Freq=ClockSA/100=6000Hz/100=50 Hz.
MOVB #0,PWMCNT4 ;Start the counter with zero
BSET PWME,%00010000 ;Enable chan 4 PWM
servo
MOVB #6, PWMDTY4 ; need value here to make duty cycle
bra servo