hamza
Posts: 76
Joined: Fri Apr 03, 2015 7:16 pm

can I use rpi as a logic analyzer???

Sun Oct 25, 2015 9:11 pm

hi

can I use rpi as a logic analyzer???

User avatar
buja
Posts: 563
Joined: Wed Dec 31, 2014 8:21 am
Location: Netherlands

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

Sun Oct 25, 2015 9:25 pm



hamza
Posts: 76
Joined: Fri Apr 03, 2015 7:16 pm

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

Tue Oct 27, 2015 6:29 pm

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

hamza
Posts: 76
Joined: Fri Apr 03, 2015 7:16 pm

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

Tue Oct 27, 2015 6:32 pm

Thank u goode..but I think the rpi is enough to read signal without additional componants.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13009
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

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

Tue Oct 27, 2015 6:44 pm

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

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

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

Tue Oct 27, 2015 8:01 pm

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

hamza
Posts: 76
Joined: Fri Apr 03, 2015 7:16 pm

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

Wed Oct 28, 2015 5:11 pm

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 ~ $

hamza
Posts: 76
Joined: Fri Apr 03, 2015 7:16 pm

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

Wed Oct 28, 2015 5:13 pm

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

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

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

Wed Oct 28, 2015 10:04 pm

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&

hamza
Posts: 76
Joined: Fri Apr 03, 2015 7:16 pm

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

Thu Oct 29, 2015 6:06 pm

thank you...its working now but the screen is pink...i think there is something wrong!!!@!!!!!
Image
Last edited by hamza on Thu Oct 29, 2015 6:11 pm, edited 1 time in total.

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

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

Thu Oct 29, 2015 6:11 pm

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

hamza
Posts: 76
Joined: Fri Apr 03, 2015 7:16 pm

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

Thu Oct 29, 2015 6:24 pm

sorry there is no update or any change..just pink or blue screen. :mrgreen: :?: :roll:

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

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

Thu Oct 29, 2015 6:59 pm

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).

hamza
Posts: 76
Joined: Fri Apr 03, 2015 7:16 pm

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

Thu Oct 29, 2015 9:13 pm

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

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

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

Thu Oct 29, 2015 9:40 pm

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 5546 times

hamza
Posts: 76
Joined: Fri Apr 03, 2015 7:16 pm

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

Fri Oct 30, 2015 9:59 am

Thank u joan...its working correctly now

I hope the time mesuearment is accurate.

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

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

Fri Oct 30, 2015 11:17 am

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.

hamza
Posts: 76
Joined: Fri Apr 03, 2015 7:16 pm

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

Fri Oct 30, 2015 9:04 pm

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

Return to “Beginners”