“The SPC (Short PWM Code) protocol is an enhanced version based on the SENT (Single Edge Nibble Tranmission) protocol. It realizes data transmission through pulses between the falling edges of two adjacent cycles. Compared with analog output and PWM output, it has a good EMC characteristics, with high transmission speed, strong reliability and anti-interference ability.
“
SPC overview
The SPC (Short PWM Code) protocol is an enhanced version based on the SENT (Single Edge Nibble Tranmission) protocol. It realizes data transmission through pulses between the falling edges of two adjacent cycles. Compared with analog output and PWM output, it has a good EMC characteristics, with high transmission speed, strong reliability and anti-interference ability. This protocol is widely used for accurate rotational angle measurement and position detection, automotive applications including pedal, accelerator or gear lever position detection, suspension control or direct torque detection of electric power steering systems, etc.
The SPC protocol performs data transmission in the form of single-wire half-duplex transmission, and can control up to 4 sensors at the same time. Different from SENT, SPC adds a new trigger field, which can represent three modes: synchronization mode, ID selection and range selection. The value of each field of SPC represents a four-bit value according to the time between two falling edges. The result obtained by dividing the falling edge time by a fixed value minus 12 is the value represented, and this fixed value becomes the unit. time (UT).
SPC frame format introduction
Figure 1 SPC frame format
・Trigger field (master Trigger Pulse): sent by the host, the length is different according to the mode.
・Sync frame: sent by the slave, indicating that the slave starts to collect data.
・Status field (status Nibble): Indicates the current status of the slave. When the mode of the trigger field is ID selection or range selection, it also indicates the ID or current range value of the slave.
・Data Nibble: Indicates the data collected by the slave. According to the settings of the slave, the number of data fields can vary from 3 to 6. Its data can include Hall value and temperature value.
・Check field (CRC Nibble): Provide a check value to check whether the frame is correct.
Example application
1. Decoding example
Simulate the SPC communication protocol and decode the data, as shown in Figure 2 below:
Figure 2 SPC decoding configuration parameters
As shown in the figure above, configure the parameters required for SPC decoding, where the time slice width refers to the unit time set by the host. According to the nature of the data fields of the frame, set the number of data fields, as shown in the following figure:
Figure 3 Meaning of the number of data fields
As shown in the figure above, when the number of data fields is 3 or 4, it means that the data only has Hall values. With a number of 5 or 6, the sensor measures and transmits the temperature value in addition to the Hall value.
Figure 4 SPC decoding
Figure 5 SPC decoding
As shown in the figure above, this frame indicates that the trigger field is range selection, and the selected range is 100mT, and the status field indicates that the current state of the sensor is Normal and the current magnetic flux range is 200mT.
Summarize
The ZDS4054 Plus oscilloscope now supports SPC protocol decoding, which is more convenient to use. Go to the official website to upgrade the firmware and try it out. Click to read the original text at the bottom to jump to the official website link.
The Links: MG100J2YS50 SX14Q006