I don't see the need for an interrupt for what you're doing there.Though I'd probably setup the CCP module manually and write to the dutycycle register instead of using the HPWM command since I Believe you'll get some discontinuties in the output when constantly changing the dutycycle using HPWM - may be wrong on that and/or it may not matter in your case, try it.Code:X = 5 Start: HPWM 3, X, 20000 SOUND PortC.3, [255, 5] ' Make sound for ~60ms X = X + 5 Goto Start
/Henrik.
Bookmarks