Author Topic: "Tiny RC Scope"/TinyPinChange/SoftSerial for Disgispark and Digispark pro  (Read 4428 times)

RC Navy

  • Jr. Member
  • **
  • Posts: 54
  • When you like, even too much, it is not enough!

The port of the <TinyPinChange> library for Digispark pro is finished: I will provide the update very soon.

I took this opportunity to extend it with some new methods which makes this library more user friendly.
I also add some new examples.
Among them, a "Tiny RC Scope" which demonstrates the capabilities of <TinyPinChange> and <SoftSerial> libraries: it's an application which transforms the Digispark (pro) in a real time ASCII oscilloscope for one RC channel with the help of a Terminal (Serial console, Hyper Terminal, TeraTerm, Minicom, CoolTerm, etc). The bi-directional SoftSerial interface on a single wire is available in pin P2. The cable described on shall be used to interface with a native COM port or a Serial/USB adaptor.
It is able to measure the pulse width (Range 500µs -> 2500µs) of one RC channel and the RC period (Range: 15ms->30ms) as well.
The display refresh rate is around 2 Hz, which is sufficient.
The serial rate shall be 57600 bauds: this is the faster rate that supports receiving too.

Live screenshot of "Tiny RC Scope":

This application embeds an RC signal generator: output on P1 (pulse of 1,5ms followed by a low level of 18,5ms by default -> RC Period=20ms).
By connecting P1 to P0, it's possible to evaluate (and test) the "Tiny RC Scope" capabilities.
Cherry on the cake, by sending some keys through the SoftSerial interface, its possible to tune the pulse width of the built-in RC generator:
- "-" key: decreases the current pulse width with a step of 10µs
- "+" key: increases the current pulse width with a step of 10µs
- "m" sets the current pulse width to 500µs (min value)
- "n" or "N" sets the current pulse width to 1500µs (usual RC Neutral value)
- "M" sets the current pulse width to 2500µs (Max value)
As the SoftSerial is half duplex, the keys shall be sent between 2 display refreshes: easy since the refresh rate is around 0.5 second.
If the RC signal is not connect to an input, a flat line is displayed.

Easy to use for measuring real RC signals:
- Let P1 pin (the built-in RC generator) unplugged.
- Connect one output of a RC receiver to the P0 input of the "Tiny RC Scope"

You will find this tool in the examples delivered with the updated <TinyPinChange> for Digispark pro.

Note: only tested on the Digispark (not pro).
For now, I haven't any Digispark pro, but I'm confident, it should work as well for it.

Available in my GitHub repository:,
« Last Edit: December 28, 2014, 11:13:14 am by RC Navy »