You can use
http://darreltaylor.com/DT_INTS-14/intro.html
This is the easy way.
Or you can read in the manual for an explanation on how to write your own.
You can use
http://darreltaylor.com/DT_INTS-14/intro.html
This is the easy way.
Or you can read in the manual for an explanation on how to write your own.
Dave
Always wear safety glasses while programming.
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.
Totaly, i have tried all the methods you have suggested me, unfortunately the results wasn't so good.
In every case, there was a small interrupt on the sound.
I decided to produce the white noise by an external small circuit, and then to process it with PWM.
Thank you all.
Bookmarks