Arduino library which allow to decode characters on J1850-PWM mode. It works with wire, radio and laser transmissions. You just have to choose your bit-rate (lower is better), tx and rx pins. It doesn't have either a header nor a parity check. These functions could be implemented at a higher protocol layer. It doesn't detect SOF (start of frame) and EOF (end of frame) yet.
Required libraries:
- DigitalWriteFast (Tested with version 1.0.0, Download: https://github.com/watterott/Arduino-Libs)
- EnableInterrupt (Tested with version 0.9.5, Download: https://github.com/GreyGnome/EnableInterrupt)
This library has been tested with:
- Wire connection between two Arduino
- Radio connection (multipoint) with FSK modulation (and OOK too), module RTX-MID-868. Datasheet: https://goo.gl/UEv8ii
- Laser connection (experimental circuit)
Arduino Uno (TRX) | Arduino Uno (TRX) | Notes |
---|---|---|
13 | 3 | Intelligent signal Tx |
3 | 13 | Intelligent signal Rx |
GND | GND | Common GND |
Arduino Uno (TX) | RTX-MID-868 module | Notes |
---|---|---|
13 | 4 | Intelligent signal Tx |
12 | 5 | Enable TX/RX |
11 | 6 | Power Up/Down |
3 | 9 | Intelligent signal Rx |
+5V | 10 | +2,5V ÷ +6V |
GND | 2, 7 | Common GND |
In order to keep the transmission medium free (ether) after transmission, it is recommended to use the "setTxRxModePin" method (see example sketch "Advanced_TX"). The "mode_pin" is connected to the radio module and is used to choose the transmission directions (to select transmission or reception, see datasheet of RTX-MID-868 module https://goo.gl/UEv8ii).