PDA

View Full Version : Add-on to ViewPort: an event driven Logic State Analyzer (use with ViewPort 4.2



Bob Anderson
12-22-2009, 01:17 AM
This add-on only works properly with version 4.2.5 of ViewPort (see www.HannoWare.com).

This program is particularly useful during the development of SPI and I2C drivers for the Propeller Chip. It provides a stable display that makes it easy for precise measurements to be taken.

One of the minor miracles of the Propeller chip is that all 8 cogs can "see" the state of all 32 I/O pins at the same time and can read and modify locations in Hub memory at any time. This makes it possible to "self-test" during development on a Propeller by using one or more cogs to "watch" what's going on in Hub memory with variables and read the state of I/O pins. This is the approach that ViewPort takes. In order to see/modify variables, one cog is loaded with a program (Conduit.spin) that streams at up to 2 Mbps the value of selected variables to the ViewPort GUI. Conduit.spin provides a bi-directional link that allows variable values to be changed while the program-under-test is running. It also provides a mechanism for the setting of breakpoints and single stepping through a SPIN program.

ViewPort has a second program (QuickSample.spin) that can be loaded into a cog (or optionally 4 cogs). This program continually samples all 32 I/O pins at a fixed rate and streams their values back to the ViewPort GUI where a logic state analyzer (LSA) displays the results. QuickSample can be configured from the ViewPort GUI to take samples at a rate as fast as one sample every 4 instruction times, which is every 200 ns when the Propeller is running at 80 Mhz. 360 samples are taken in a burst, then streamed to the GUI for display.

The Event Logger program is an add-on that communicates with ViewPort via the DDE (Dynamic Data Exchange) protocol and provides an event oriented (i.e., edge transitions) LSA as opposed to the sampling LSA that ViewPort includes. The EventLogger.spin program is loaded into a cog (either instead of QuickSample or in addition to). After a specified trigger condition is satisfied, this cog records the time (via the CNT register) of changes of state on a specified set of I/O pins. Up to 99 events will be recorded and then sent via Conduit.spin running in the Propeller chip to ViewPort and on to the Event Logger Client.exe where a GUI displays the results in a plot that can be zoomed, scrolled, measured, printed, etc.

An event driven LSA is better able to deal with "bursty" data where some events of interest take a relatively long period of time, but are then followed by much faster events. On a sampling LSA, the sample rate would have to be set low enough to allow the long events to be seen, but then there would be insufficient resolution to see the fast events accurately. Sometimes ways can be found to work around this conflict, but an event driven LSA is easier to use in such a case.· Attached are two images showing this in action.

I also attached the manual (it's a .chm file, so you have to tell Windows it's safe to open else it won't show the contents).


Event Driven Logic State Analyzer for ViewPort
http://http://obex.parallax.com/objects/554/

hover1
12-22-2009, 01:55 AM
Bob..That's super!! Nice manual also.
Jim

Hanno
12-22-2009, 03:14 AM
This is awesome Bob!
Your attached images really show the power of your event driven analyzer. With your add-on, people are able to monitor high-speed serial communication spread out over long periods of time. It nicely complements ViewPort's "quicksample" object which monitors high-speed (up to 80Msps) activity on all 32 IO pins. Your distribution is very professional, things just work and the documentation is polished.
Looking forward to seeing more!
Hanno

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Co-author of the official Propeller Guide- available at Amazon (http://www.amazon.com/Programming-Customizing-Multicore-Propeller-Parallax/dp/0071664505)
Developer of ViewPort (http://hannoware.com/viewport), the premier visual debugger for the Propeller (read the review here (http://www.parallax.com/Portals/0/Downloads/docs/article/ROBOT_ViewPort.pdf), thread here (http://forums.parallax.com/showthread.php?p=760083)),
12Blocks (http://12blocks.com), the block-based programming environment (thread here (http://forums.parallax.com/showthread.php?p=819680))
and PropScope (http://hannoware.com/propscope), the multi-function USB oscilloscope/function generator/logic analyzer

Cluso99
12-22-2009, 03:25 AM
Congratulations Bob. Another great addition to the Propeller tools.

Would you like to add a reference to the Prop Tools thread (see link in my signature)?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBlade (http://forums.parallax.com/showthread.php?p=786418),·RamBlade (http://forums.parallax.com/showthread.php?p=849265),·SixBlade (http://forums.parallax.com/showthread.php?p=780033), website (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) (http://forums.parallax.com/showthread.php?p=778427) ZiCog (Z80) (http://forums.parallax.com/showthread.php?p=788511) , MoCog (6809) (http://forums.parallax.com/showthread.php?p=811043)
· Search the Propeller forums (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBladeProp is: www.bluemagic.biz/cluso.htm (http://www.bluemagic.biz/cluso.htm)

Bob Anderson
12-22-2009, 04:07 AM
Cluso99 said...
Congratulations Bob. Another great addition to the Propeller tools.

Would you like to add a reference to the Prop Tools thread (see link in my signature)?


I think it will be a useful tool so adding it to your Prop Tools thread is justified.· Is there anything I have to do?