Page 1 of 1

can I use rpi as a logic analyzer???

Posted: Sun Oct 25, 2015 9:11 pm
by hamza
hi

can I use rpi as a logic analyzer???

Re: can I use rpi as a logic analyzer???

Posted: Sun Oct 25, 2015 9:25 pm
by buja

Re: can I use rpi as a logic analyzer???

Posted: Sun Oct 25, 2015 10:17 pm
by B.Goode

Re: can I use rpi as a logic analyzer???

Posted: Tue Oct 27, 2015 6:29 pm
by hamza
Thank u buja
I followed all steps..step by step...but nothing is working...
When I type sudo pigpio
The error is comnand not found...
What is the problem??
Becouse I installed it or rpi 2b

Re: can I use rpi as a logic analyzer???

Posted: Tue Oct 27, 2015 6:32 pm
by hamza
Thank u goode..but I think the rpi is enough to read signal without additional componants.

Re: can I use rpi as a logic analyzer???

Posted: Tue Oct 27, 2015 6:44 pm
by mahjongg
as long as the signals are digital, and stay below 3.3V (or you will blow up the PI which is NOT 5V tolerant).

also, there are very cheap 8-channel USB logic analyzers these day that sell for just $8 or so from Chinese sites, including windows software, they work, I have used them. They are clones of the Salea logic analyzer, but for a tenth of the price, Here is one of them: http://www.dx.com/nl/p/logic-analyzer-w ... i_GRVf4beA

Re: can I use rpi as a logic analyzer???

Posted: Tue Oct 27, 2015 8:01 pm
by joan
hamza wrote:Thank u buja
I followed all steps..step by step...but nothing is working...
When I type sudo pigpio
The error is comnand not found...
What is the problem??
Becouse I installed it or rpi 2b
sudo pigpiod

Re: can I use rpi as a logic analyzer???

Posted: Wed Oct 28, 2015 5:11 pm
by hamza
thank u

I followed all steps,but still not working....plz advice

pi@raspberrypi ~/PIGPIO $ gcc -o foobar foobar.c -lpigpio -lrt -lpthread
gcc: error: foobar.c: No such file or directory
pi@raspberrypi ~/PIGPIO $ sudo ./foobar
sudo: ./foobar: command not found
pi@raspberrypi ~/PIGPIO $ sudo pigpiod
2015-10-28 20:07:01 initInitialise: Can't lock /var/run/pigpio.pid
Can't initialise pigpio library
pi@raspberrypi ~/PIGPIO $ cd
pi@raspberrypi ~ $ sudo pigpiod
2015-10-28 20:07:48 initInitialise: Can't lock /var/run/pigpio.pid
Can't initialise pigpio library
pi@raspberrypi ~ $

Re: can I use rpi as a logic analyzer???

Posted: Wed Oct 28, 2015 5:13 pm
by hamza
mahjongg wrote:as long as the signals are digital, and stay below 3.3V (or you will blow up the PI which is NOT 5V tolerant).

also, there are very cheap 8-channel USB logic analyzers these day that sell for just $8 or so from Chinese sites, including windows software, they work, I have used them. They are clones of the Salea logic analyzer, but for a tenth of the price, Here is one of them: http://www.dx.com/nl/p/logic-analyzer-w ... i_GRVf4beA
thank you but I quick solution becouse I have no time for sample delevery issue. :D

Re: can I use rpi as a logic analyzer???

Posted: Wed Oct 28, 2015 10:04 pm
by joan
hamza wrote:thank u

I followed all steps,but still not working....plz advice

pi@raspberrypi ~/PIGPIO $ gcc -o foobar foobar.c -lpigpio -lrt -lpthread
gcc: error: foobar.c: No such file or directory
pi@raspberrypi ~/PIGPIO $ sudo ./foobar
sudo: ./foobar: command not found
pi@raspberrypi ~/PIGPIO $ sudo pigpiod
2015-10-28 20:07:01 initInitialise: Can't lock /var/run/pigpio.pid
Can't initialise pigpio library
pi@raspberrypi ~/PIGPIO $ cd
pi@raspberrypi ~ $ sudo pigpiod
2015-10-28 20:07:48 initInitialise: Can't lock /var/run/pigpio.pid
Can't initialise pigpio library
pi@raspberrypi ~ $
Try

sudo killall piscope
sudo killall pigpiod
sudo rm /var/run/pigpio.pid

Any of all of the above may return errors. Ignore them.

Then

sudo pigpiod
piscope&

Re: can I use rpi as a logic analyzer???

Posted: Thu Oct 29, 2015 6:06 pm
by hamza
thank you...its working now but the screen is pink...i think there is something wrong!!!@!!!!!
Image

Re: can I use rpi as a logic analyzer???

Posted: Thu Oct 29, 2015 6:11 pm
by joan
I have no idea. Send some events to see if the screen updates.

E.g. from the command line enter the following command

pigs pwm 4 128 mils 1000 pwm 4 0

Re: can I use rpi as a logic analyzer???

Posted: Thu Oct 29, 2015 6:24 pm
by hamza
sorry there is no update or any change..just pink or blue screen. :mrgreen: :?: :roll:

Re: can I use rpi as a logic analyzer???

Posted: Thu Oct 29, 2015 6:59 pm
by joan
hamza wrote:sorry there is no update or any change..just pink or blue screen. :mrgreen: :?: :roll:
I don't know why you have funny colours.

You still don't seem to be starting things properly.

Try

sudo killall piscope
sudo killall pigpiod
sudo rm /var/run/pigpio.pid

Any of all of the above may return errors. Ignore them.

Then

sudo pigpiod
piscope&

(NOT sudo pigpiod & piscope).

Re: can I use rpi as a logic analyzer???

Posted: Thu Oct 29, 2015 9:13 pm
by hamza
joan wrote:
hamza wrote:sorry there is no update or any change..just pink or blue screen. :mrgreen: :?: :roll:
I don't know why you have funny colours.

You still don't seem to be starting things properly.

Try

sudo killall piscope
sudo killall pigpiod
sudo rm /var/run/pigpio.pid

Any of all of the above may return errors. Ignore them.

Then

sudo pigpiod
piscope&

(NOT sudo pigpiod & piscope).
Thank you but still same problem..... :shock: :roll: :roll:
Image

Re: can I use rpi as a logic analyzer???

Posted: Thu Oct 29, 2015 9:40 pm
by joan
I don't normally run piscope on the Pi.

I just did

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

on a Pi2.

It works fine on the Pi2.
piscope.gif
piscope.gif (58.76 KiB) Viewed 5547 times

Re: can I use rpi as a logic analyzer???

Posted: Fri Oct 30, 2015 9:59 am
by hamza
Thank u joan...its working correctly now

I hope the time mesuearment is accurate.

Re: can I use rpi as a logic analyzer???

Posted: Fri Oct 30, 2015 11:17 am
by joan
hamza wrote:Thank u joan...its working correctly now

I hope the time mesuearment is accurate.
The default sampling rate at 5µs intervals should get relative timings accurate to +/- 10µs. That is good enough for almost everything I do on the Pi.

For anything else I'd used a Saleae 8-channel logic analyser dongle clone. They sample at up to 24 MHz.

Re: can I use rpi as a logic analyzer???

Posted: Fri Oct 30, 2015 9:04 pm
by hamza
joan wrote:
hamza wrote:Thank u joan...its working correctly now

I hope the time mesuearment is accurate.
The default sampling rate at 5µs intervals should get relative timings accurate to +/- 10µs. That is good enough for almost everything I do on the Pi.

For anything else I'd used a Saleae 8-channel logic analyser dongle clone. They sample at up to 24 MHz.
Thank u ..you are great man.
:D