I have just completed a revision to the PWM support for Great Cow BASIC. Updated to support channels PWM1 to PWM9
.
You can enable fixed mode PWM for chips with PWM Modules (we already support CCP/PWM fixed mode) for PWM channels 1 thru 9 and you can select timer 2, 4 or 6.
Anyone want to test this new capability? You will need to have v0.98.00 as a mimimum.
Enjoy.
Anobium
Overview of Capability
You do not need to define all the timers and channels, just define the constants you need.
The minimum to get one channel operational are the following:
1. A timer with a frequency
2 .A PWM channel with a duty
3. A PWM channel clock source
The PWM_yy_Duty xx' where yy is between 1 and 9 and is a valid PWM module, and, xx is the Duty cycle for specific channels
The PMW_zz_Clock_Source tt. Where zz is channel and tt is the PWM clock source.
Example: For PWM channel 2 with a frequency of 38Khz with a duty of 50% with a clock source of timer 2, use
I have just completed a revision to the PWM support for Great Cow BASIC. Updated to support channels PWM1 to PWM9
.
You can enable fixed mode PWM for chips with PWM Modules (we already support CCP/PWM fixed mode) for PWM channels 1 thru 9 and you can select timer 2, 4 or 6.
Anyone want to test this new capability? You will need to have v0.98.00 as a mimimum.
Enjoy.
Anobium
Overview of Capability
You do not need to define all the timers and channels, just define the constants you need.
The minimum to get one channel operational are the following:
1. A timer with a frequency
2 .A PWM channel with a duty
3. A PWM channel clock source
The PWM_yy_Duty xx' where yy is between 1 and 9 and is a valid PWM module, and, xx is the Duty cycle for specific channels
The PMW_zz_Clock_Source tt. Where zz is channel and tt is the PWM clock source.
Example: For PWM channel 2 with a frequency of 38Khz with a duty of 50% with a clock source of timer 2, use
The complete set of constants, with some examples, is shown below:
Last edit: Anobium 2017-10-04