Custom one wire protocol decoding and forwarding

renatoa
Posts: 1
Joined: Mon May 06, 2024 1:30 pm

Custom one wire protocol decoding and forwarding

Postby renatoa » Tue May 07, 2024 9:08 am

I have a Chinese equipment that outputs a custom serial data stream, consisting in a 7ms packet preamble, followed by 7 bit data packet where 0s are 650us LOW pulses, 1s are 1500us, and the HIGHs are 750us.
I managed decoding of this stream atm pretty OK using a blocking approach, i.e. pulsePin for time measurement.
Now a new requirement was added, decoding is no more enough, we need altering some bits and forward the new packet on another pin, so an interrupt based approach is imposed.
How far is the encoding I described above from decoded PPM used in RC systems?
Or, is any other project close to these specifications that I can use just by changing the timings, without re-coding everything from zero ?
Not so proficient with interrupts and timers handling, sorry :(

Thank you !

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Custom one wire protocol decoding and forwarding

Postby ESP_Sprite » Tue May 07, 2024 9:28 am

If any, look at the RMT peripheral; that should be able to handle all that for you in hardware.

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 61 guests