
are zero, it could mean that there are multiple Motorons using the same address, and they have
different jumper states, and both of them are responding to your controller when you attempt to
read this variable.
This variable can be useful as part of a procedure for verifying that every Motoron in your system
has the correct address.
PWM mode
Category
motor-specific
Offset
1
Type
unsigned 8-bit
Data
Bits 0 to 3 specify the PWM frequency:
•
0:
Default (20 kHz)
•
1:
1 kHz
•
2:
2 kHz
•
3:
4 kHz
•
4:
5 kHz
•
5:
10 kHz
•
6:
20 kHz
•
7:
40 kHz
•
8:
80 kHz
Bits 4 to 7 are reserved and should be set to 0.
Default
0
Command
Set variable
Arduino library
void setPwmMode(uint8_t motor, uint8_t mode)
uint8_t getPwmMode(uint8_t motor)
The lower 4 bits of this byte specify the PWM frequency to use for this motor.
You can set this variable with a “Set variable” command, which takes a 14-bit argument. The
upper 6 bits are ignored, while the lower 8 bits get copied to this variable.
Due to hardware limitations on the M3S256 and M3H256, motors 2 and 3 must have the same
PWM frequency, so setting the PWM mode of one of these motors also sets the PWM mode of
the other.
Pololu Motoron Motor Controller User’s Guide
© 2001–2022 Pololu Corporation
8. Variable reference
Page 41 of 67