1

I have looked at the WiringPi site and have found:

pwmSetRange (unsigned int range) ;

This sets the range register in the PWM generator. The default is 1024.

pwmSetClock (int divisor) ;

This sets the divisor for the PWM clock.

What does that mean? What is the PWM clock and what is meant by "range register".

nullexception
  • 29
  • 1
  • 4

1 Answers1

1

In digital electronics, especially computing, a hardware register stores bits of information in such a way that systems can write to or read out all the bits simultaneously.

I'm not sure, but page 139 of this sounds like range N and divisor M:

A value represented as a ratio of N/M can be transmitted along a serial channel with pulse width modulation in which the value is represented by the duty cycle of the output signal. To send value N/M within a periodic sequence of M cycles, output should be 1 for N cycles and 0 for (M-N) cycles.

This answer seems to agree.