Line: 1 to 1 | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
%DASHBOARD{ section="banner" | |||||||||||||||||||||||||||||
Line: 214 to 214 | |||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||
< < | Only three port pins are supported so far. The 16 bit TIMER1 is used for the timebase, time resolution is 1 us (32 MHz SysClk divided by 32). The PWM scale is from 0 (0 % duty cycle) to 1000 (100 % duty cycle), this results in a PWM frequency of 1 kHz. If you need higher PWM frequencies, decrease the divider and/or the scale. | ||||||||||||||||||||||||||||
> > | Only two port pins are supported so far. The 16 bit TIMER1 is used for the timebase, time resolution is 1 us (32 MHz SysClk divided by 32). The PWM scale is from 0 (0 % duty cycle) to 1000 (100 % duty cycle), this results in a PWM frequency of 1 kHz. If you need higher PWM frequencies, decrease the divider and/or the scale. | ||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||
< < | PWM port pins: D6 (TIM1CH1), D9 (TIM1CH2), D3 (TIM1CH3) | ||||||||||||||||||||||||||||
> > | PWM port pins: D11 (TIM1CH1), D4 (TIM1CH2) | ||||||||||||||||||||||||||||
Simple test program to set brightness of a LED on pin D3 with a potentiometer on A0. Default PWM frequency is 1 kHz (prescaler set to 32). You can set the prescale with the word pwmprescale from 32 kHz (value 1) down to 0.5 Hz (64000).
| |||||||||||||||||||||||||||||
Line: 254 to 254 | |||||||||||||||||||||||||||||
Output Compare | |||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||
> > | Only one port pin (D9) is supported so far. | ||||||||||||||||||||||||||||
: oc-toggle ( -- ) 5000000 ICOCperiod! \ 5 s period ICOCstart | |||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||
< < | 3 0 OCmod 1000000 0 OCstart \ toggle D0 after 1 s 3 1 OCmod 2000000 1 OCstart \ toggle D1 after 2 s 3 5 OCmod 3000000 5 OCstart \ toggle D5 after 3 s | ||||||||||||||||||||||||||||
> > | 3 9 OCmod 1000000 0 OCstart \ toggle D9 after 1 s | ||||||||||||||||||||||||||||
begin waitperiod cr .time | |||||||||||||||||||||||||||||
Line: 347 to 345 | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
Line: 386 to 384 | |||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||
Push Buttons | |||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||
RGB LED |