pigpio library
pigpio pigpio C I/F pigpiod pigpiod C I/F Python pigs piscope Misc Examples Download Site Map

piscope

Introduction

piscope is a digital waveform viewer for the Raspberry.  It shows the state (high or low) of selected gpios in real-time.

See video.

piscope uses the services of the pigpio library.  pigpio needs to be running on the Pi whose gpios are to be monitored.

The pigpio library may be started as a daemon (background process) by the following command.

sudo pigpiod

piscope may be invoked in three different ways

On the Pi
pi_host ~ $ piscope
Pi captures data
Pi processes data
Pi displays data
On the Pi (with the
display on a remote
 machine)
remote_host ~ $ ssh -X pi_host
pi_host ~ $ piscope
Pi captures data
Pi processes data
Remote displays data
On a remote machine
remote_host ~ $ export PIGPIO_ADDR=pi_host
remote_host ~ $ piscope
Pi captures data
Remote processes data
Remote displays data

piscope operates in one of three modes

Live
The latest gpio samples are displayed.

The mode will automatically change to Pause if a sampling trigger is detected.

There are four triggers.  Each trigger is made up of a combination of gpio states (one of don't care, low, high, edge, falling, or rising per gpio).  Triggers are always counted.  In addition a trigger may be sample to, sample around, or sample from, a so called sampling trigger.
New samples are added to the sample buffer.

Once the sample buffer is full the oldest samples are discarded.
Play
Recorded gpio samples are displayed.

The play speed may be varied between 64 times real-time to 1/32768 of real-time.

The page up key increases the play speed by a factor of 2.  The page down key decreases the play speed by a factor of 2.  The home key sets the play speed to 1X.
New samples are added to the sample buffer.

Once the sample buffer is full new samples are discarded.
Pause
Recorded gpio samples are displayed.

The left and right cursor keys move the blue marker to the previous or next edge.  By default all gpio edges are considered.  Clicking on a gpio name will limit edge searches to the highlighted gpios only.

The left and right square bracket keys move the blue marker to the previous or next trigger.

The time between the blue and gold markers is displayed.  The gold marker is set to the blue marker by a press of the 'g' key.
New samples are added to the sample buffer.

Once the sample buffer is full new samples are discarded.

In all modes the down and up cursor keys zoom the time scale in and out.

Samples can be saved with File Save All Samples or File Save Selected Samples.

To select samples enter pause mode. Press 1 to specify the start of the samples (green marker) and 2 to specify the end of the samples (red marker).

The samples may be saved in the native piscope format or in VCD format.

Data saved in VCD format may be viewed and further processed with GTKWave.

Data saved in the native piscope format may be restored later with File Restore Saved Data.

Installation

To download and install piscope.

Pi hard float (pre-built image)

wget abyz.co.uk/rpi/pigpio/piscope.tar
tar xvf piscope.tar
cd PISCOPE
make hf
make install

Pi soft float (pre-built image)

wget abyz.co.uk/rpi/pigpio/piscope.tar
tar xvf piscope.tar
cd PISCOPE
make sf
make install

Linux 64 bit X86/AMD (pre-built image)

wget abyz.co.uk/rpi/pigpio/piscope.tar
tar xvf piscope.tar
cd PISCOPE
make x86_64
make install

All machines (building from source)

You only need to perform this step if you want to build the executable from the source files.  This is not needed if you use a pre-built image.

WARNING
: Installing gtk+-3.0 uses a lot of SD card space.

Most of the space used by gtk+-3.0 is taken up by unneeded *-dbg packages.

With *-dbg packages an additional 3753MB SD space is required.

If you edit the list of packages to be downloaded and remove the *-dbg packages only 134MB of additional SD space is needed (as at the time of writing).

#
# *** This may take a lot of time and use a lot of SD card space ***
#
sudo apt-get install gtk+-3.0
#
wget abyz.co.uk/rpi/pigpio/piscope.tar
tar xvf piscope.tar
cd PISCOPE
make
make install

|pigpio| |pigpio C I/F| |pigpiod| |pigpiod C I/F| |Python| |pigs| |piscope| |Misc| |Examples| |Download| |Site Map|
© 2012-2016
e-mail: pigpio @ abyz.co.uk
Updated: 08/03/2016