Implementing SENT protocol - I put a wager on teensy
I am trying to determine if I can use my Teensy 3.2 to implement the single wire communication protocol SENT (Single edge nibble transmission). A picture is shown below.
It is essentially a string of Pulses that stores information in the duration from negative edge to negative edge of each pulse. It counts the number of "ticks" in each pulse, which are little sub units of time like seconds on a clock. The number of ticks in a pulse is the data. For data pulses it is 12-27 ticks with 12 representing 0 and 27 representing 15. Each pulse has a predetermined low time at the start of my pulse usually 5 ticks. So for each pulse Low ticks + high ticks = total ticks
https://en.wikipedia.org/wiki/SENT_(protocol)
I have a high speed sensor that operates on a .5 us tick time. So I am replicating that sensor, I need to send 4 consecutive pulses, and I am trying to find the best way to do it. I tried simply using delays and digitalWriteFast but I couldn't get sub microsecond delays. I began looking into hardware timers, the PDB has a back to back chain I thought I could use but that is going to require some digging.
But I am just getting started implementing things like this with microcontrollers. So to all your infinite wisdom I ask, what are some of the routes I should take? Maybe there is something I am not even familiar exists that will simplify this task.
We have an engineer here at our company that was adamant this was impossible with the Teensy, I really think he is wrong and I really want to prove him wrong. We have a big bet going that involves public embarrassment if I get it working
I am trying to determine if I can use my Teensy 3.2 to implement the single wire communication protocol SENT (Single edge nibble transmission). A picture is shown below.
It is essentially a string of Pulses that stores information in the duration from negative edge to negative edge of each pulse. It counts the number of "ticks" in each pulse, which are little sub units of time like seconds on a clock. The number of ticks in a pulse is the data. For data pulses it is 12-27 ticks with 12 representing 0 and 27 representing 15. Each pulse has a predetermined low time at the start of my pulse usually 5 ticks. So for each pulse Low ticks + high ticks = total ticks
https://en.wikipedia.org/wiki/SENT_(protocol)
I have a high speed sensor that operates on a .5 us tick time. So I am replicating that sensor, I need to send 4 consecutive pulses, and I am trying to find the best way to do it. I tried simply using delays and digitalWriteFast but I couldn't get sub microsecond delays. I began looking into hardware timers, the PDB has a back to back chain I thought I could use but that is going to require some digging.
But I am just getting started implementing things like this with microcontrollers. So to all your infinite wisdom I ask, what are some of the routes I should take? Maybe there is something I am not even familiar exists that will simplify this task.
We have an engineer here at our company that was adamant this was impossible with the Teensy, I really think he is wrong and I really want to prove him wrong. We have a big bet going that involves public embarrassment if I get it working
Last edited: