I am using a PIC 18F2331 and I'm trying to utilize the Power Control PWM module which has three independent PWM generators.
I need to be able to update the duty cycle of each PWM generator on the fly while running in free running mode (where the PWM output remains the same until a new duty cycle is given).
I am very new to this realm of bits, bytes and all, but somehow I have been writing successful intricate programs on the 12F series PICs. Anyhow, I digress.
Can someone please help me with the proper configuration lines for PIC BASIC PRO. I am having a hard time understanding exactly how to implement or issue the duty cycle to the PWM module.
The duty cycle registers have 14-bit resolution (???) PDC0 through PDC3. The datasheet is fairly vague (at least at my level of understanding) as to what command line must be issued and in what format to change or issue a duty cycle AND what range of numbers correspond to 0% to 100%.
The Pic BASIC Pro PWM and HPWM commands are useless for my application so please don't bother mentioning them. I need the PWM module to run independently of the code, and HPWM does not support more than 3 PWM modules (only the CCP channels).
I appreciate your help very much in advance...
Bookmarks