-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan Schlieper
committed
Sep 21, 2018
1 parent
0ba9426
commit d05e97d
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# SBus Protocol | ||
|
||
The sbus protocol is a 100 kilo baud serial protocol (1 start bit, 8 data bits, 1 even parity bit and 2 stop bits). Every 7 milliseconds a packet of 25 bytes get sent by the receiver. The packet is made up of a start byte, 22 data bytes, one flag byte and an end byte: | ||
|
||
[start][data1][data2][data3][data4][data5][data6][data7][data8][data9][data10][data11][data12][data13][data14][data15][data16][data17][data18][data19][data20][data21][data22][flags][end] | ||
|
||
The start byte is 0x0f and the end byte usually 0x00. Remember these are the values the teensy sees after the sbus protocol has been inverted by the transistor. The teensys UART needs the inverter to recognize the start bit (low), partity bit and stop bits (high). | ||
|
||
Inside the 22 data bytes the 16 rc channels are encoded. Each rc channel is made up of 11 bits (a value between 0 and 2047). Because of this a rc channel value is spread over 2-3 data bytes. Channel 1 e.g. can be found in [data1] and the next 3 bits of [data2]. Please see the code for details. | ||
|
||
--- | ||
|
||
Date: 2018-09-21 | ||
|