Shop OBEX P1 Docs P2 Docs Learn Events
Viewport v1.1: Free 80Mhz Scope! EDIT: THIS THREAD DESCRIBES AN OUTDATED VERSIO — Parallax Forums

Viewport v1.1: Free 80Mhz Scope! EDIT: THIS THREAD DESCRIBES AN OUTDATED VERSIO

HannoHanno Posts: 1,130
edited 2007-07-06 11:28 in Propeller 1
WARNING: THIS THREAD DESCRIBES AN OUTDATED VERSION OF VIEWPORT. PLEASE DOWNLOAD THE LATEST FROM: mydancebot.com

Your Propeller is now a 80Mhz Scope! Viewport v1.1 lets you measure all 32 IO pins every clock cycle. Viewport still gives you all the flexibility and power of a PC based digital scope, but now also supports triggers and a logical state analyzer mode to view all 32 bits on one screen.

Lots of other improvements- see http://mydancebot.com/products/viewport/11/faq.php

Viewport is free for personal hobby use- download it here:
http://mydancebot.com/products/viewport/11/

Thanks to Parallax for a great product, we're having lots of fun getting top performance out of the chip- developing an affordable balancing bot, moving data to/from the PC at 2MegaBaud through optimized bitbanging, and now sampling the IO port every cycle with advanced self-modifying code running interleaved on 4 cogs!
Hanno
[url=http://myDanceBot.com: Home of the Affordable Balancing Robot]myDanceBot.com: Home of the Affordable Balancing Robot[/url]

Post Edited (Hanno) : 9/4/2007 8:19:30 PM GMT
932 x 455 - 30K
«1

Comments

  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-06-20 14:16
    How do you get 80Mhz when the processors run at 20MIPS?

    Graham
  • HannoHanno Posts: 1,130
    edited 2007-06-20 14:27
    Good question! Each of the 8 cogs runs at 20MIPS. We use 4 cogs to take measurements every clock cycle. This is the maximum speed for taking measurements of a single register. Here is a time line:
    Time: Cog 1 : Cog 2 : Cog 3 : Cog 4
    0___:Start__:______:______:_____
    1___:______:Start__:______:_____
    2___:______:______:Start__:_____
    3___:______:______:______:Start
    and repeat....
    Each cog takes 1 measurement every 4 cycles- but since we use 4 cogs, we can measure every cycle! This also allows us to take 1600 measurements...

    Post Edited (Hanno) : 6/20/2007 2:31:55 PM GMT
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-06-20 15:09
    Of course!, I noticed you mentioned interleaving 4 cogs but got it into my head they would have to be out of phase by 1/4 of a clock cycle but rather they need to be 1/4 of an instruction cycle out of phase which is a clock cycle, doh!

    Graham
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-06-20 16:03
    Excellent, it's fantastic to see someone take something and make it even more powerful, also the PC based GUI is a very nice touch. Kudos!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • rokickirokicki Posts: 1,000
    edited 2007-06-20 17:08
    Congratulations! That's really cool stuff.
  • inakiinaki Posts: 262
    edited 2007-06-20 18:12
    Which kind of data transfer interface are you using·in/with the PC side to match the 80Mhz data rate ?





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • janbjanb Posts: 74
    edited 2007-06-20 18:20
    Hi Hanno,
    this is really cool! How about an upgrade to 160 MHz [noparse]:)[/noparse] ?

    One could achieve it (with prop clock @ 80 MHz ) by:
    - providing the probed signal to 2 pins at (almost) the same time, to be exact delaying one of them in hardware
    by 1/160 MHz=6.25 ns . I mean add ~4 foot of coax cable between the source and 2nd pin.
    - using 2 pair of 4 cogs to do the measurement

    To accomplish that one would need to shut down all graphics while taking this snap shot.
    After data are acquired the 3 TV-cogs would be fired again and display the result.

    I have not tried it, just brain storming
    Jan
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-06-20 19:10
    inaki said...

    Which kind of data transfer interface are you using·in/with the PC side to match the 80Mhz data rate ?

    It's only collecting the data into buffers at that speed, it isn't communicating with the PC at that rate.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-20 19:51
    It would be interesting to be able to see the results on a Composite or VGA monitor (directly from the Propeller). =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • HannoHanno Posts: 1,130
    edited 2007-06-20 19:58
    Inaki- The measurements take a very interesting path from hardware to viewer. First they are "mov"ed rapidly from the INA register to the fast assembly cog registers- this takes 4 cycles/sample/cog. After 400 samples have been taken on each cog, samples from all the cogs are consolidated into the slower main memory. From here, they're collected by the Viewport USB conduit, and sent over the wire at 2mbps to the desktop application where they are stored in a buffer ready to be displayed as bit traces, value traces, displayed as base 2, 10, 16, or shared with others. The difficult part was ensuring that throughout this chain, only complete measurements would be shown, not the first part of one and the last of another. I was very excited to see it all work!
  • rokickirokicki Posts: 1,000
    edited 2007-06-20 20:02
    Yeah, it's a great accomplishment. Consider that we are recording 32 bits at 80MHz, so that's an aggregate rate (during collection)
    of 2.56Gb/sec (even if only for 20 microseconds or something). That's really fast.
  • fishfish Posts: 55
    edited 2007-06-20 20:22
    Very cool,
    I have·a spare (semi-crippled) propstick that I was hoping to find a good/useful application to dedicate·it to.
    (Semi-crippled as I accidently·busted off the mini usb port and have re-connected it back on with little wires...not so pretty now).
    But now it will have new life.
    Great!
    thx
    fish

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Did I make a unit test for it? No... Did·I run the test·suite·before checking it in? No... But it shouldn't break anything.· ~intern·(just before we let him go).
  • HarleyHarley Posts: 997
    edited 2007-06-20 20:31
    Hanno,

    Now this is really great. Paul's app I thought was great and couldn't be sped up. Wow, isn't the Prop an amazing chip?

    I downloaded the necessary files and have played with ViewPort a little.

    Unfortunately, there must still be a bug or two. If I do certain mouse clicks, it sometimes quits (= returns to desktop view) or crashes and hangs with an error window of "Unhandled exception occurred...." message. First time I could not even clear it with ShutDown. (Other times Shutdown does resolve the 'hang'.) At that point clicking on either of the three buttons, the error window or even the Viewpoint app window, only a 'ding' bell sound happens and nothing is resolved. Just wanted to let you know something isn't quite right.

    Seems if mouse clicks are too fast, or sequence not right, the above can happen. Feedback; have you ever noticed any such behavior?

    I appreciate this application of the Prop to this task. I have an original Ant8 (from RockyLogic, England) used for some PIC applications a few years back. A very usable device. How much program space is left over after ViewPort in programmed into a Prop? I have an project which requires two Props because of more than 32 I/Os needed. But no spare cogs for ViewPort. I'll have to look into your source to see if I can make use of it.

    Thanks for the innovation for this project.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • SteelSteel Posts: 313
    edited 2007-06-20 20:31
    Hanno-

    Am I missing something?·

    I compiled the FastScope_10 (and ViewportConduit_11) onto the Propeller Chip.

    When I run the Viewport application, and click "connect" or "Identify Hardware", they don't see the Propeller chip.· I have verified that I have the Comport set correctly.·

    Is there something that I am missing?·

    Thanks.

    Shaun
  • HannoHanno Posts: 1,130
    edited 2007-06-20 21:46
    Apologies to those having troubles.

    We'll resolve problems as soon as we diagnose them. You can help by sending as much information as you have to support@mydancebot.com
    Viewport includes a "debug" mode that logs diagnostic information to a file- viewport.log, stored in the Viewport folder. You can enable this mode in the Edit/Preferences screen. Sending us this file should help us resolve the last glitches.
    Thanks!
    Hanno
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-06-20 21:47
    Just load fast scope 10 and it should work automatically.

    If I run it and then change to another program and then try to go back it looses the connection and on some occasions crashes (un responsive and then an error window).

    Graham
  • inakiinaki Posts: 262
    edited 2007-06-20 21:52
    Hanno, thanks for your explanation.

    Do you think that something like the following·would be possible(it is a succesful product by the way):

    http://www.tech-tools.com/dv_main.htm





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • HannoHanno Posts: 1,130
    edited 2007-06-20 21:57
    Inaki-
    Yes- once the bugs are ironed out, Viewport should be a wonderful tool to measure all 32 I/O pins on the Propeller at high data rates. Once the Analog Dreamkit is finished- you can do analog data as well! Some advanced features, like pre/post trigger are not there yet- but we'll get there.
  • El PaisaEl Paisa Posts: 375
    edited 2007-06-21 02:09
    The program in Auto keeps looking for com 4 port.

    If I select manually com 2 port, the program starts then crashes.
  • HannoHanno Posts: 1,130
    edited 2007-06-21 02:39
    We're busy working on a fix for 2 bugs that seem to be causing the majority of problems:
    1) Auto com port detection doesn't work for some setups (Temporary workaround is to manually set your com port in Edit/Preferences)
    2) Crashes/Frozen screens on some setups/situations. (No known workaround)

    The fix should be ready within the next day- stay tuned. Until then, if you encounter a different bug, please let us know- best is by email: support@mydancebot.com. Thanks for being patient!
    Hanno
  • bambinobambino Posts: 789
    edited 2007-06-21 16:55
    Hanno,
    Great app!
    I too experienced a hang up, but the cause was in not having the prop powered when bringing up viewport. I had to end the process from taskmanager to unfreeze it.
    Just a quick question though! As I ran the app for the first time I saw outputs on channels 0 thru 7 and of course 30. I can understand the output on the com channel, but is the first 8 neccessary, leaving the other pins in between for general use?
    I ask because of the use of this on the demo board where 0 thru 7 are the only spare pins you have.
  • HannoHanno Posts: 1,130
    edited 2007-06-21 22:04
    We're making good progress on a much more stable release, thanks for everyone's help in letting us know what the issues are!

    Bambino- The second line of the "main" program starts a cog which "wiggles" the lowest 8 bits for demo purposes- this is a good signal to view and trigger on. Comment out this line when you actually need to use those pins.

    The wiggle is very simple, but high performance, it counts backwards on INA at 20MIPS. (Every 255 it takes an extra 8 cycles to reset):
    Wiggle mov dira, :mask
    :init mov outa,:mask
    :wloop djnz outa,#:wloop
    jmp #:init
    :mask LONG $FF

    (edit, I use : pmask in the program, but : p yields the tongue.gif smileyface. I didn't know my code was that happy!)
  • HannoHanno Posts: 1,130
    edited 2007-06-22 04:02
    I just uploaded an update to the website.·
    http://mydancebot.com/products/viewport/11/download.php
    It should fix a number of problems, including stability issues, com port problems, and other minor items.· It's also prettier- see attached.· Let us know if you have any problems!
    Hanno
    530 x 322 - 11K
    lsa.GIF 10.7K
  • bambinobambino Posts: 789
    edited 2007-06-22 19:42
    Just Downloaded, Thanks.
    This is amazing. I thought I had a good deal when I gave $100 bucks for a 40 mhz scope a year ago. This is digital, but thats mostly what I use it for anyway.
    You mention an anolog version, that should really be amazing! Anyway, Thanks again.
  • HarleyHarley Posts: 997
    edited 2007-06-22 19:50
    Hanno,

    Yes, the latest version handles much better.

    I did find one bug yet. If I click on Help under Help menu item, it hangs up. Only once did I notice it went to the Internet, but stopped that before I realized 'maybe' it is online help; maybe not.

    Is there a user manual which describes the selections? Like what is 'Traces' useful for? Some text would be useful

    When Reset Prop was done it seemed to stop everything, rather than start over. At first nothing was happening; unless it takes a long while. If I did a Connect then it seemed to restart operating.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • HannoHanno Posts: 1,130
    edited 2007-06-22 22:56
    Harley,

    A detailed "Help" document is available online at:
    mydancebot.com/products/viewport/11/help.php
    When you click on Help inside Viewport, it should take you there. Keeping it online allows us to keep it up to date. Let us know if anything is missing...

    "Traces" graphs the value of your measurements over time- just like an oscilloscope. The graph will be automatically scaled and centered if you keep the "AutoCenter" button on. This is especially useful when you use Viewport to track variables in your program. For example, when developing our balancing robot, we used an early version of Viewport to monitor all vital signs from the bot on a single screen: gyro and accelerometer readings, kalman filtered angle, and motor output. When we had problems, we could look back in time to see what happened. We also took plenty of "pictures" of the graphed traces to monitor our progress and share measurements within the team. This style of debugging was very productive- we never had to litter our program with "print statements", the performance wasn't impacted since Viewport runs in its own cog, and we always had all data available- up to 50 channels, sampled 1000 times/second for several minutes!

    "Reset Prop" sends a "reset" command to the propeller. This is the same as pushing the "reset" button your propeller board. We suggest you load Viewport into the EEPROM (using F11 in the Parallax IDE), that way Viewport will continue working after a reset.
    Good luck on your project!
    Hanno
  • HarleyHarley Posts: 997
    edited 2007-06-22 23:37
    Thanks Hanno,

    Probably what was happening is I didn't wait long enough for the online Help to happen; only looked 'hung up'.

    I didn't think to look back at your web site. Didn't notice the Help menu item, as the formatting on an old iMac isn't the same as a PC or others. So now have it printed out to study off-line. Don't always have the opportunity to take the time to read online.

    I can imagine how useful ViewPort has been for your bot project. But using 4 cogs, doesn't leave much for a project. I've a 2-Prop project and only have 2 and 3 spare cogs in them.

    You wrote "up to 50 channels". I wonder if you'd meant '30' without the A30 and A31 pins used by the USB i/f?

    Thanks again yeah.gif for this useful program and for the friendly help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • Gerry KeelyGerry Keely Posts: 75
    edited 2007-06-23 11:13
    I tried this with a Windows XP(Home) computer but as soon as the spin code loads I get the "dreaded" blue screen. Anybody else having the same probliem??



    Regards

    Gerry
  • HannoHanno Posts: 1,130
    edited 2007-06-23 19:38
    Gerry-
    Sorry about your problem- when are you getting the blue screen?
    1- After using the Parallax tool to load the propeller with the Viewport spin code?
    2- Or, when doing something in the Viewport Application?

    We only have control over #2- but we need more information- a trace file would be very helpful, or a description of what you're doing...
    Thanks!

    Harley-
    Viewport only takes 1 cog to transmit from the Propeller to/from the PC. The 80Mhz scope is just one of many applications of Viewport, (see [noparse][[/noparse]url:]http://mydancebot.com/products/viewport/11/applications.php for some ideas) and it takes an additional 4 cogs to do the fast measurements, and even a 5th cog to provide the demo wiggle siignals.

    I did mean 50 channels- each a 32 bit, long variable representing some variable in my Propeller program. To allow Viewport to graph and monitor your variables, you just need to include one line in your spin program:

    For example, if your program is using two variables, a and b to do calculations, then you can graph those variables just by including the VP object:
    OBJ
    vp:"ViewportConduit_10"

    and starting the Viewport cog with the appropriate configuration string:
    vp.start(31, 30,@a,String("a+,b="))

    Viewport has a tool to create the configuration string, see "File/Configuration String Tool"
    Hanno
  • rjo_rjo_ Posts: 1,825
    edited 2007-06-30 18:01
    Hanno,

    I didn't believe it...

    So, I downloaded it... and IT'S TRUE!!!

    Everything worked... first time, second time, etc. (Occasionally have to exit and restart program when I do something stupid.)
    I let the demo run all night... no problem.

    Absolute fantabulousity...
    (Almost idiot proof[noparse]:)[/noparse]

    Rich
Sign In or Register to comment.