#include <HWPWM.bas> ' source in /Program Files/Coridium/BASIClib
SUB HWPWM ( channel, cycletime, hightime )
ARMmite version
The ARMmite supports up to 8 channels of hardware driven PWM. The IO direction of the pin will be set to output. Once programmed these will continue to generate the specified PWM until re-programmed or reset.
Cycletime is in microseconds, is the time for a single PWM cycle. Hightimes are also in microseconds and represent the amount of time during the cycle that the corresponding outputs are high. If the value is -1, then that IO is left as a digital IO.
| hightime1 | IO(0) |
| hightime2 | IO(1) |
| hightime3 | IO(2) |
| hightime4 | IO(3) |
| hightime5 | IO(4) |
| hightime6 | IO(9) |
| hightime7 | IO(10) |
| hightime8 |
IO(11) |
ARMmite PRO version
The ARMmite PRO supports up to 8 channels of hardware driven PWM. The IO direction of the pin will be set to output. Once programmed these will continue to generate the specified PWM until re-programmed or reset.
Cycletime is in microseconds, is the time for a single PWM cycle. Hightimes are also in microseconds and represent the amount of time during the cycle that the corresponding outputs are high. If the value is -1, then that IO is left as a digital IO.
| hightime1 | IO(0) |
| hightime2 | IO(1) |
| hightime3 | IO(2) |
| hightime4 | IO(3) |
| hightime5 | IO(4) |
| hightime6 | IO(9) |
| hightime7 | IO(10) |
| hightime8 |
IO(11) |
ARMexpress LITE version
The ARMexpress LITE supports up to 6 channels of hardware driven PWM. The IO direction of the pin will be set to output. Once programmed these will continue to generate the specified PWM until re-programmed or reset. The format of the command uses 8 channel assignments, but 2 of the channels are not available on the pins.
Cycletime is in microseconds, is the time for a single PWM cycle. Hightimes are also in microseconds and represent the amount of time during the cycle that the corresponding outputs are high. If the value is -1, then that IO is left as a digital IO.
| hightime1 | IO( 5 ) |
| hightime2 | IO( 6 ) |
| hightime3 | IO( 3 ) |
| hightime4 | not available |
| hightime5 | IO( 14 ) |
| hightime6 | not available |
| hightime7 | IO( 13 ) |
| hightime8 |
IO( 15 ) |
PROplus SuperPRO LITE version
The PROplus/SuperPRO supports up to 6 channels of hardware driven PWM. The IO direction of the pin will be set to output. Once programmed these will continue to generate the specified PWM until re-programmed or reset. Use the <HWPWM17.bas> include file.
Cycletime is in microseconds, is the time for a single PWM cycle. Hightimes are also in microseconds and represent the amount of time during the cycle that the corresponding outputs are high. If the value is -1, then that IO is left as a digital IO.
| hightime1 | P2(0) |
| hightime2 | P2(1) |
| hightime3 | P2(2) |
| hightime4 | P2(3) |
| hightime5 | P2(4) |
| hightime6 | P2(5) |