Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 3 1 2 3 LastLast
Results 1 to 25 of 53

Thread: My Teensy Logic Analyzer

  1. #1

    My Teensy Logic Analyzer

    Version 3.2 of a SUMP logic analyzer for the Teensy 3.1/3.2/3.5/3.6 and LC.

    It supports 8 channels up to 48 MHz, 250k samples (3.6), 24 MHz, 58k samples (3.2), 8 MHz, 4k samples (LC), with full triggering capability (trigger anywhere in the buffer).

    With hardware mode, 2 channels up to 120 MHz for 3.6, 72 MHz for 3.1/3.2, 24 MHz for LC.

    Pre-built releases for Windows and Linux.

    https://github.com/LAtimes2/TeensyLogicAnalyzer
    Last edited by LAtimes; 09-11-2016 at 11:00 PM. Reason: Update for V3.2

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    Following: installation.md [ on windows 10 ]

    I got p#1 TeensyLogicAnalyzer code from GitHub and the sketch loaded and compiled and I have the two second heartbeat.

    I extracted ◦ols-0.9.7 SP2

    Copied [single file] "C:\tCode\LOGIC_SNIFF\TeensyLogicAnalyzer\LogicSni ffer\ols.profile-teensy_96.cfg" to ""C:\tCode\LOGIC_SNIFF\ols-0.9.7.2\plugins\ols.profile-teensy_96.cfg""

    Run.bat opens the cmd window and loads theme and then the app starts.

    Got stuck as I jumped over this step in #4 : 'Set ... Analyzer port to your Teensy COM port'

    NOTE: 'Show device metadata' resets the Device type to Open Bench, must be restored to Teensy.

    Setup seems to work as documented! - Pressing CAPTURE

    Wired LED pin 13 to pin 2 [chan 0] and [3.3v resistor to LED on GND] from resistor to pin 5 [chan 7] and nothing shows over zero? LED flickers - capture says it finished.

    Nothing else to analyze now . . . but it seems a new tool in the works, Thanks

  3. #3
    For step 4, if the Teensy is already running, there should be a single COM port in the pulldown for the Analyzer port. There may be a feature in the OLS that you have to set the Device type before selecting Show device metadata.

    If you uncomment line 35 of the main file (#define CREATE_TEST_FREQUENCIES), you should get 25 kHz data without having to connect any signals.

    Quote Originally Posted by defragster View Post
    Following: installation.md [ on windows 10 ]

    I got p#1 TeensyLogicAnalyzer code from GitHub and the sketch loaded and compiled and I have the two second heartbeat.

    I extracted ◦ols-0.9.7 SP2

    Copied [single file] "C:\tCode\LOGIC_SNIFF\TeensyLogicAnalyzer\LogicSni ffer\ols.profile-teensy_96.cfg" to ""C:\tCode\LOGIC_SNIFF\ols-0.9.7.2\plugins\ols.profile-teensy_96.cfg""

    Run.bat opens the cmd window and loads theme and then the app starts.

    Got stuck as I jumped over this step in #4 : 'Set ... Analyzer port to your Teensy COM port'

    NOTE: 'Show device metadata' resets the Device type to Open Bench, must be restored to Teensy.

    Setup seems to work as documented! - Pressing CAPTURE

    Wired LED pin 13 to pin 2 [chan 0] and [3.3v resistor to LED on GND] from resistor to pin 5 [chan 7] and nothing shows over zero? LED flickers - capture says it finished.

    Nothing else to analyze now . . . but it seems a new tool in the works, Thanks

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    Quote Originally Posted by LAtimes View Post
    For step 4, if the Teensy is already running, there should be a single COM port in the pulldown for the Analyzer port. There may be a feature in the OLS that you have to set the Device type before selecting Show device metadata.

    If you uncomment line 35 of the main file (#define CREATE_TEST_FREQUENCIES), you should get 25 kHz data without having to connect any signals.
    I got the COM port resolved, but three notes on one line let me miss the middle one at first time.
    4.Make these settings:
    Connection type to Serial port
    Analyzer port to your Teensy COM port
    Port Speed 115200bps (may not matter since USB)
    My note was selecting Teensy - then getting metadata - results in Teensy being unselected if not noticed before leaving. It no longer does this now that I have been here before it seems to have changed the 'default' device.

    I uncommented the line 35 #define - On sample not seeing anything but perhaps vertical lines on the extreme ends. With zero bars in between on all channels with T_3.1.

    I wired pin 13 to 14 [chan 1] and still a flat line - even though the LED flickers during sample. That should work for you right?

    I suppose you know it has a couple dozen warnings on building.

  5. #5
    Sorry about these issues. I made a last minute change last night and now it doesn't record consistently. I'll get it fixed tomorrow and put out a new release.

    I've glanced through the warnings and nothing of great concern. I'll get them resolved soon.

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    @LAtimes - no problem - shows great promise - just thought I'd document my walk through of your steps. Other than 'fixes needed' it should be a good tool to have. I've never used one before so have a lot to learn - and now nothing more to buy to have one. Will have to look if there is a way to have the Teensy_MTLA auto Trigger (?) to have the suspect user Teensy set a pin to initiate a capture window.

    Based on seeing the LED flicker - pinning #13 to #14 would be a valid self test right?

  7. #7
    Just released beta2 version that fixes these issues.

    The LED flashes a lot before and after capturing data, but during the capture, the LED is on when looking for a trigger, then off after triggered. If pins 13 and 14 are tied together, channel 1 will be high for one sample at the beginning. If you set up a trigger on channel 1 going high (Mask = 2, Value = 2), channel 1 will be high before the trigger and low one sample after the trigger.

    If you compile with CREATE_TEST_FREQUENCIES defined (line 35), you will see signals without having to connect or jumper any pins. Note that pins 5,6,20,21 will become outputs when using test frequencies.

    Quote Originally Posted by defragster View Post
    @LAtimes - no problem - shows great promise - just thought I'd document my walk through of your steps. Other than 'fixes needed' it should be a good tool to have. I've never used one before so have a lot to learn - and now nothing more to buy to have one. Will have to look if there is a way to have the Teensy_MTLA auto Trigger (?) to have the suspect user Teensy set a pin to initiate a capture window.

    Based on seeing the LED flicker - pinning #13 to #14 would be a valid self test right?

  8. #8
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    SYNC - COPY and ...
    exit status 1
    could not convert 'setup' from 'sumpSetupVariableStruct' to 'sumpVariableStruct'

  9. #9
    This is my first project using github and having to learn about commits, pushes etc.

    I added a new file, send_data.ino. Is that in your directory? I got this error when I didn't have it.

    Quote Originally Posted by defragster View Post
    SYNC - COPY and ...

  10. #10
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    Yes, That file is there and adds to the open IDE - that is where it goes with the failure?

  11. #11
    It compiles for me. What do you mean by SYNC - COPY?

  12. #12
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    SYNC - from my GitHub fork - then copy all files from there to my 'run' directory replacing the old files

    <edit>
    That is how I got the source files before.

    I just cleaned my run directory and did a fresh copy from GitHub and I get the same result.
    Last edited by defragster; 12-21-2015 at 12:20 AM.

  13. #13
    I downloaded a zip file from GitHub and put it in a new directory and it compiles. Hmmm ... I'm baffled

  14. #14
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    Went to GitHub - Pulled the ZIP - extracted - same result . . .

    Arduino: 1.6.7 (Windows 10), TD: 1.27-beta1, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz (overclock), US English"

    << REMOVED BOGUS BUILD FEEDBACK >>

    ^
    exit status 1
    could not convert 'setup' from 'sumpSetupVariableStruct' to 'sumpVariableStruct'
    Last edited by defragster; 12-23-2015 at 08:22 PM.

  15. #15
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    I was compiling this under IDE 1.6.7 - just opened it under 1.6.6 and it compiles there.

  16. #16
    I'm still using 1.6.5. I made a change that might fix it - I had 2 functions called sendData with slightly different pass parameters - it looks like the compiler was using the wrong one. I deleted the old one since it's not used anymore - that may get 1.6.7 to work.

    Quote Originally Posted by defragster View Post
    I was compiling this under IDE 1.6.7 - just opened it under 1.6.6 and it compiles there.

  17. #17
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    I moved sendData() to TeensyLogicAnalyzer from send_data now I get this error:
    exit status 1
    aggregate 'sampleSetupStruct sampleSetup' has incomplete type and cannot be defined
    With that change of moving that function - I get the same error in IDE 1.6.6 ????

  18. #18
    I had problems with the incomplete type issue. I may have to solve it the way I did with other projects - create a .h file with all the type definitions. It's due to the way Arduino creates forward declarations.

    I'll also update to 1.6.7/1.27 to test it.

  19. #19
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    I was going to mention that there wasn't a .h file with the common structural stuff

  20. #20
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    LAtimes - this note from Paul makes a note on the changes relating to compile issues like these: Teensyduino-1-27-Beta-1-Available

  21. #21
    Beta 3 released - works under 1.6.7/1.27, adds Teensy LC support.

  22. #22
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    Compiled without even a warning - and test frequencies are evident when compiled and capture with this line active:
    "#define CREATE_TEST_FREQUENCIES // if uncommented, it will output frequencies on pins 3 and 6"

    Click image for larger version. 

Name:	TLA_b3.PNG 
Views:	244 
Size:	35.4 KB 
ID:	5896

    <edit> : Okay compiles with a note that most all RAM is in use.
    Last edited by defragster; 12-23-2015 at 08:24 PM.

  23. #23
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    LAtimes - LogicAnalyzer in forum use! Just posted in this thread: stirplate-design.

    It you wanted to grab the attached sketch you can see if it gives what looks right to you. On screen time labels seemed confused between us and ms - at least I was. Do those values get calculated in OpenBench - or are they provided? Labels may be working in the end - but when I needed it most I wasn't getting the units as I was expecting at times on hover.

    It helped me fix the code doing PWM output I never did before. It could show me more I'm sure. Wire from test Teensy pin #5 PWM and #13 LED. The code may not be perfect - I quite when I saw what I wanted working.

    Can I get longer sample data run if I remove unused data channels? Just wondering without looking - I got what I needed tonight.

  24. #24
    Glad to hear it was useful. Don't have time now to answer all your questions, but will release a new version of the logic analyzer tomorrow with advanced capability - 2 channels at 232k samples. Also up to 24 MHz at 58k samples, 8 channels.

    Quote Originally Posted by defragster View Post
    LAtimes - LogicAnalyzer in forum use! Just posted in this thread: stirplate-design.

    It you wanted to grab the attached sketch you can see if it gives what looks right to you. On screen time labels seemed confused between us and ms - at least I was. Do those values get calculated in OpenBench - or are they provided? Labels may be working in the end - but when I needed it most I wasn't getting the units as I was expecting at times on hover.

    It helped me fix the code doing PWM output I never did before. It could show me more I'm sure. Wire from test Teensy pin #5 PWM and #13 LED. The code may not be perfect - I quite when I saw what I wanted working.

    Can I get longer sample data run if I remove unused data channels? Just wondering without looking - I got what I needed tonight.

  25. #25
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,056
    It was VERY useful - exactly what I needed! Looking forward to the next update.
    Click image for larger version. 

Name:	StirPwmLA2.jpg 
Views:	241 
Size:	27.9 KB 
ID:	5969

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •