/PulseIntervalModulator

Arduino based Differential Pulse Position Modulator/Demodulator. Encodes/Decodes a simple custom protocol based on the interval between pulses.

Primary LanguageC++

Pulse Interval Modulator

Arduino based Differential Pulse Position Modulator/Demodulator.

Encodes/Decodes a simple custom protocol based on the interval between pulses.

Example 1 Byte packet.

Demodulator

Catches the pulse stream and builds up a packet buffer, as long as the incoming bits are valid, otherwise it resets. All work is done during interrupts.

Modulator

Bit bangs out the packets using rolling Timer0 PWM interrupt on Channel A. Does not affect millis(), micros() or delay(). Channel B is still free. All work is done during interrupts.

On AVR, depends on Fast for IO https ://github.com/GitMoDu/Fast as digitalWrite is too slow.

Protocol

  • Initial pulse to start preamble.
  • Pulse on preamble interval.
  • Encoded pulses with size of packet (6 bits).
  • Encoded pulses with data bits.