This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VARIABLE CLOCK | |
VARIABLE MAIN | |
VARIABLE MAIN_OFFSET | |
VARIABLE LEGSV | |
VARIABLE SPEED 100 SPEED ! | |
: TSET ( n -- ) \ set timer pins output period | |
\ max period of 65535 clock ticks | |
DUP TA0 PWM-PERIOD DUP TA1 PWM-PERIOD DUP TA2 PWM-PERIOD | |
DUP TA3 PWM-PERIOD DUP TB0 PWM-PERIOD DUP TB1 PWM-PERIOD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: TSET ( n -- ) \ set timer pins output period | |
\ max period of 65535 clock ticks | |
DUP TA0 PWM-PERIOD DUP TA1 PWM-PERIOD DUP TA2 PWM-PERIOD | |
DUP TA3 PWM-PERIOD DUP TB0 PWM-PERIOD DUP TB1 PWM-PERIOD | |
DUP TB2 PWM-PERIOD DUP TB3 PWM-PERIOD DUP TC0 PWM-PERIOD | |
DUP TC1 PWM-PERIOD DUP TD0 PWM-PERIOD DUP TD1 PWM-PERIOD | |
TD2 PWM-PERIOD ; | |
: PSET ( n -- ) \ set pwm pins output period | |
\ max period of 32767 clock ticks |