Improvements to Logic Analyzer

Hacking multi-tool. Get one for $30, including worldwide shipping.

Improvements to Logic Analyzer

Postby LAtimes » Sat Feb 22, 2014 12:09 pm

I noticed that the times in the Logic Analyzer were not very accurate (I have a Bus Pirate v3), so I modified the firmware to correct it. As long as I was in there, I also increased the maximum sample rate from about 1 MHz to 4 MHz. Then I added sampling prior to the trigger. Is anyone else interested in this, or do the people that care already use the Logic Sniffer?
LAtimes
Newbie
Newbie
 
Posts: 6
Joined: Sat Feb 22, 2014 11:58 am

Re: Improvements to Logic Analyzer

Postby MickM » Sat Feb 22, 2014 12:53 pm

Hi;
I am interested, and I am sure others are too.
Please publish your code and hex file here.

I run Fedora linux and cannot get stuff to compile.

Mick M
MickM
Jr. Member
Jr. Member
 
Posts: 68
Joined: Wed Jun 19, 2013 5:18 pm
Location: close to Seattle U.S.A.

Re: Improvements to Logic Analyzer

Postby tayken » Sat Feb 22, 2014 1:04 pm

If you put the changes here, we can push them to the SVN. :)
User avatar
tayken
Developer
Developer
 
Posts: 1506
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: Improvements to Logic Analyzer

Postby LAtimes » Sat Feb 22, 2014 1:10 pm

I'm glad people are interested :). I am cleaning up the code so it is more understandable, then I will post it. I use Windows and MPLab X. For some reason, when I load my hex file it halts due to trying to write over the bootloader, but it seems to load enough of the file for it to work.
LAtimes
Newbie
Newbie
 
Posts: 6
Joined: Sat Feb 22, 2014 11:58 am

Re: Improvements to Logic Analyzer

Postby USBEprom » Sun Feb 23, 2014 6:47 am

Hi LAtimes,

very glad to hear that, you are welcome!
It is much terrific awesome what you're doing.
Would be great if you could provide the update.
Thanks in advance!

Regards,

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 113
Joined: Wed Mar 14, 2012 4:09 pm

Re: Improvements to Logic Analyzer

Postby LAtimes » Sun Feb 23, 2014 9:58 am

Here's my code and a hex file for the improved logic analyzer. Improvements are:
1. Accurate timing up to 4 MHz
2. Pre-sampling prior to trigger up to 1 MHz. To use in OLS client, enable trigger and adjust Before/After ratio on Triggers tab.

If you use my hex file, the 'i' command will say Firmware v6.1 SUMP test.
Known limitations: I've only tested with a v3 Bus Pirate. I compiled with optimization O1. If no optimization, 1 MHz timing may be off by 10-20%.
Attachments
BPv3-v6.1_SUMP_test_hex.c
(170.18 KiB) Downloaded 226 times
SUMP.c
(14.77 KiB) Downloaded 212 times
LAtimes
Newbie
Newbie
 
Posts: 6
Joined: Sat Feb 22, 2014 11:58 am

Re: Improvements to Logic Analyzer

Postby tayken » Sun Feb 23, 2014 11:20 am

[quote="LAtimes"Known limitations: I've only tested with a v3 Bus Pirate. I compiled with optimization O1. If no optimization, 1 MHz timing may be off by 10-20%.[/quote]
No problem on v3, we can adapt it to v4 if required. Optimization is a bummer, policy was using no optimization if I remember correctly. However, it can still be pushed to the SVN considering it has very nice improvements. :)
User avatar
tayken
Developer
Developer
 
Posts: 1506
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: Improvements to Logic Analyzer

Postby LAtimes » Sun Feb 23, 2014 3:22 pm

I just checked it without optimization and 1 MHz seems to have correct timing. I forgot that I made some changes last night to remove some extra code, which got it just within spec.
LAtimes
Newbie
Newbie
 
Posts: 6
Joined: Sat Feb 22, 2014 11:58 am

Re: Improvements to Logic Analyzer

Postby LAtimes » Sun Mar 16, 2014 10:13 am

Well, I have more improvements:

a) sampling rates up to 16 MHz
b) additional samples when using fewer channels (up to 32k for 1 channel)
c) trigger location anywhere in the buffer
d) backward compatible with previous Logic Analyzer modes

To use the new features requires loading new firmware on the Bus Pirate and a new profile for the OLS client, both of which are included in the files below. See readme.txt on how to use the new enhancements.

Let me know if you use it and like it :). Or any problems :(
Attachments
Enhanced Logic Analyzer.zip
(62.52 KiB) Downloaded 258 times
LAtimes
Newbie
Newbie
 
Posts: 6
Joined: Sat Feb 22, 2014 11:58 am

Re: Improvements to Logic Analyzer

Postby USBEprom » Tue Mar 18, 2014 1:20 pm

Hi LAtimes,

thank you very much for all these additional improvements!
Really a good news, congratulations!
Terrific amount of new performances and features, really hard to believe!
Sadly I am a little busy right now and above all I am far from my Bus Pirate at this moment...
However, I am confident that surely I will check it the next weekend.
Thanks again!

Regards,

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 113
Joined: Wed Mar 14, 2012 4:09 pm

Re: Improvements to Logic Analyzer

Postby ian » Wed Mar 19, 2014 10:23 pm

Thanks, nice update! Added to tracker and will push to SVN.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Improvements to Logic Analyzer

Postby USBEprom » Sun Mar 30, 2014 10:47 am

Hi LAtimes,

first apologize me for the late in the answer and over all due the fact I'm a little hurry right now.
Hexadecimal firmware is loaded good in the BP, no problem.
Client recognize new features after adding the new profile and response of metadata button confirm all it's good.
I tried to take some shot, though I been able to only get 8MHz square wave on all channels using any available sampling rate.
Because I'm babo surely I did do something wrong, no way!
Only sad side for me it is based on 6.1 release while for various reasons I need the features of the 6.3, so I have to reload this latter on my BP.
Anyway great piece of software both hardware and client side which improve a lot the device.
Thank you very much and congratulations again one million time and more!

Regards,

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 113
Joined: Wed Mar 14, 2012 4:09 pm

Re: Improvements to Logic Analyzer

Postby Coldblackice » Tue May 20, 2014 4:36 pm

This looks great!

Like USBE mentioned about, is there any chance this could be done to 6.3 firmware? That would be fantastic, if so!
User avatar
Coldblackice
Newbie
Newbie
 
Posts: 29
Joined: Wed Mar 21, 2012 1:05 am

Re: Improvements to Logic Analyzer

Postby USBEprom » Sat Dec 03, 2016 11:48 am

Hi guys.
Sorry to exhume a such old thread.
This is only to bring to the attention of all about the thing so that somebody who has the skills, even anyone else than not the author of the improvements, can give a help if he wants.
It would merge the contents of SUMP.c Enhanced Logic Analyzer into the SUMP.c inside the current repository so that the new features are available.
I know nothing, but I understand this must be very difficult to achieve, though perhaps it is not impossible:

https://github.com/BusPirate/Bus_Pirate/issues/32

Thanks.

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 113
Joined: Wed Mar 14, 2012 4:09 pm


Return to Bus Pirate Support

cron