dsPIC33A SENT Peripheral

Last modified by Microchip on 2025/09/19 13:43

Overview

This page covers the dsPIC33A Single Edge Nibble Transmission (SENT) module, a single-wire communication protocol mainly used for sensor data transmission in automotive, industrial, and building automation applications. SENT transmits data as a series of falling edges, encoding information in the time intervals between them. 

A typical SENT message includes a Sync pulse, a status nibble, up to six data nibbles, a Cyclic Redundancy Code (CRC) nibble for error checking, and an optional pause pulse. The module supports both transmitter and receiver modes, with features like automatic data rate synchronization, hardware CRC calculation and checking, error detection, and data buffering. It also allows flexible data lengths (three to six nibbles) and supports Short PWM Code (SPC). 

The SENT module can operate as an asynchronous transmitter (sending continuous frames), a synchronous transmitter (sending one frame per trigger), or as a receiver. It provides interrupts for successful transmissions/receptions and for error conditions like framing or CRC errors. The dsPIC33A version is similar to the dsPIC33C, with the main change being the use of 32-bit registers. 

Overall, the SENT module enables reliable, efficient, and secure point-to-point communication between sensors and controllers in embedded systems. 

Back to Top

Peripheral Architecture

Block Diagram

SENT Peripheral Block Diagram

  • SENT RX Pin
    • The SENT RX pin serves as the entry point for incoming serial data.
  • Edge Detect Block
    • The edge detect block identifies falling edges in the data stream.
  • Sync Period Detector Block
    • The sync period detector block calculates time intervals between consecutive falling edges for synchronization.
  • Control and Error Detection Block
    • The control and error detection block manages control signals and detects errors.
  • Nibble Period Detector Block
    • The nibble period detector block detects finer time intervals between falling edges at the nibble level.
  • Tick Period Generator
    • The tick period generator generates Tick Time (Ttick), which is the primary unit of time in the SENT message.
  • Edge Timing
    • The edge timing block calculates the number of tick times for Sync, data nibble and pause pulses of SENT message frame.
  • SENT Edge Control
    • The SENT edge control block controls the timing of the edges in the SENT message frame.
  • Output Driver
    • The output driver drives the SENT Data pin based on the transmission Mode (TXM). In Asynchronous Mode (TXM=0), the SENT data pin is driven all the time. In Synchronous Mode (TXM=1), the pin is driven only during the data frame transmission.
  • SENT Tx Pin
    • The SENT TX pin transmits processed Serial Data to the output.

Back to Top

SENT Message Format

A SENT message consists of the following:

  • A synchronization/calibration period (“pulse”) of 56 tick times
  • A status nibble of 12 to 27 tick times
  • Up to six data nibbles of 12 to 27 tick times
  • A CRC nibble of 12 to 27 tick times
  • An optional pause pulse period of 12 to 768 tick times
SENT Message Format
Click image to enlarge.
  • The SENT message length is contingent upon the data, unless the pause pulse is utilized.
  • Since data values are encoded within the time intervals between falling edges, the SENT protocol can generate messages of variable lengths.
  • The pause pulse period is employed to extend the message length, ensuring that messages are consistently received at regular time intervals.
  • The module facilitates automatic calculation of the necessary pause duration for periodic transmissions.

Back to Top

Operation

SENT Transmitter Mode

  • When RCVEN = 0, the module operates as a transmitter.
  • Message frames are generated using the configuration and data (SENTxDATA) registers.
  • The module has two transmit operating modes selected by the TXM bit.
SENT Module in Transmitter Mode
Click image to enlarge.
ModeTXMDescription
AsynchronousTXM=0Continuously sends data message frames when the SNTEN bit is set
SynchronousTXM=1Sends messages under software control to support additional capabilities, including Short PWM Code (SPC)

SENT Asynchronous Transmitter Mode

  • The module is, by default, configured as an asynchronous transmitter.
  • In this mode, the module continuously transmits message frames as long as the SNTEN bit is set.
  • The final falling edge of the CRC nibble also serves as the first falling edge of the sync pulse, on the condition that the pause pulse is not utilized.
  • An interrupt, SENTxIF, is generated at the completion of the CRC nibble.
    The NIB[2:0] bitfield specifies which nibble is being transmitted; for example, NIB=0 indicates the status nibble, NIB=1 indicates Data Nibble 1, and so forth.
    The PAUSE signal is activated during the transmission of the pause pulse.
    SENTxIF is triggered upon successful transmission of a message frame.
SENT Asynchronous Transmitter Mode message waveform
Click image to enlarge.

SENT Synchronous Transmitter Mode

  • In this mode, the module will transmit only one message frame each time the SYNCTXEN bit is set.
  • When the data frame is complete, the SYNCTXEN bit will be cleared in hardware.
  • The line will be driven low for five ticks to complete the CRC nibble and then the line will tri-state and remain in the Idle state until SYNCTXEN is set again.
  • An interrupt is generated, five ticks after the completion of the CRC nibble.
  • The NIB[2:0] bitfield specifies which nibble is being transmitted; for example, NIB=0 indicates the status nibble, NIB=1 indicates Data Nibble 1, and so forth.
  • The PAUSE signal is activated during the transmission of the pause pulse.
  • Data frame transmission commences when the SYNCTXEN bit/signal is set, and it remains high until the data frame is fully transmitted.
SENT Synchronous Transmitter Mode message waveform
Click image to enlarge.

SENT Receive Mode

  • When RCVEN = 1, the module operates as a receiver. 
  • The captured Sync period value is readable in the SENTxSYNC register.
  • Valid data nibbles (Status, DATA1, ..., DATA6, CRC) are stored in SENTxDATA registers.
  • Data nibble is decoded based on time between falling edges (0 = 12 ticks,1 = 13 ticks,……., Fh = 27 ticks).
  • Framing error is detected (less than 12 ticks or greater than 27 Ticks): FRMERR bit is set (SENTxSTAT[2]).
  • CRC verification failure: CRCERR bit is set (SENTxSTAT[3])
  • Both errors trigger a receive error interrupt.
  • Successful data frame reception sets the SENTxIF flag.
SENT Module in Receive Mode
Click image to enlarge.

Upon receiving a valid sync pulse (56 tick time), data nibbles (Status, DATA1, ..., DATA6, CRC) are obtained and stored in the SENTxDATA registers. Decoding of the data nibble occurs based on the time between successive falling edges, where 0 corresponds to 12 ticks and Fh to 27 ticks. Here, tick represents a predetermined time unit ranging from 3us to 90us.

If a framing error is detected (less than 12 ticks or greater than 27 ticks), the FRMERR bit (SENTxSTAT[2]) is set. Similarly, if CRC verification fails, the CRCERR bit (SENTxSTAT[3]) is set. Both of these error conditions trigger a receive error interrupt. Conversely, upon successfully receiving a data frame, the SENTxIF flag is set.

SENT Receive Mode Message Waveform

  • SYNC (SYNCTXEN) indicates that a valid synchronization period has been detected. The SYNC signal goes high following the detection of a valid sync character.
  • The NIB[2:0] bitfield specifies which nibble is being received; for example, NIB=0 indicates the status nibble, NIB=1 indicates Data Nibble 1, and so forth.
  • The PAUSE signal is activated while receiving the pause pulse.
  • SENTxIF is triggered upon successful reception of a message frame.
  • IDLE indicates whether the SENT data bus is in an idle state or active.
SENT Receive Mode Message Waveform
Click image to enlarge.

Back to Top

Interrupts

Each SENT module has two interrupts associated with its operation, the SENTx Transmit/Receive Interrupt Flag (SENTxIF) and the SENTx Error Interrupt Flag (SENTxEIF). Setting the corresponding SENTx Interrupt Enable bits (SENTxIE and SENTxEIE) allows the module to generate device-level
interrupts.

The transmit/receive interrupt is generated after the transmission of a message frame in Transmit mode or the successful reception of a message frame in Receive mode.

The error interrupt is generated after a frame error or a CRC error in Receive mode. There are no error interrupts generated in Transmit mode.

Back to Top

Application Examples

  • Automotive Sensors
    • SENT is commonly used for communication between sensors in a vehicle, such as wheel speed sensors and engine control modules.
  • Building Automation
    • SENT can be used for communication between building automation devices, such as thermostats and HVAC systems.
  • Industrial Control Systems
    • SENT can be used for communication between industrial control devices, such as programmable logic controllers (PLCs) and sensors.
  • Robotics
    • SENT can be used for communication between the different subsystems of a robot, such as the control system and the actuators.

Back to Top