Closed Peter010103 closed 2 years ago
SBUS is a different protocol than PWM. Whereas PWM uses an analog pulse with a duration of 1000 to 2000 us, SBUS uses a digital byte stream with 11 bits per channel. The 172 - 1811 is simply the range of digital values per channel sent by FrSky using the default -100 to +100 percent range. Changing the range in the FrSky transmitter to +/-150% enables the full 0 - 2047 range. This library doesn't do any SBUS to PWM or PWM to SBUS conversion.
Ok thanks for your response. If there are 11 bits that can take values of 0-2047, why not write digital outputs of the "what would have been" PWM values to the digital representation as the 1000-2000 range lies within this interval?
Wouldn't having a range of 1639 (=1811-172) representing values in the range 1000us-2000us be reducing resolution?
Sorry if this is unrelated to this library which generates the required signals. But I'm just a bit confused as to why SBUS does this and feel there is something I'm missing :)
----- EDIT ----- Whoops, having the range 1639 (=1811-172) representing 1000us-2000us would be increasing resolution (0.61 us/bit).... but why does the receiver use these strange offsets of 172 and 1811?
So if I had a SBUS data value of 0 to represent 750 us and 2047 represent 2250 us (-150%~+150%), a linear mapping to find the SBUS digital values corresponding to 1000 us and 2000 us would not give 172 and 1811 respectively.
Hi, thanks for creating an easy to use library for outputting SBUS signals.
I just had a question on the range of 172-1811 offset values from the Readme. 1 channel consists of 11 bits (0-2047) and the library uses the extended range of -150% ~ +150%, which would correspond to PWM values of 750-2250 microseconds.
Doing a linear mapping to 1000-2000 microseconds, wouldn't the required range for outputting these standard rx PWM values be 341-1705. How did you choose the range 172-1811? Could this be specified in the Readme?
Thanks !