Draft for Review - PE Kit Lab - Propeller + PC Applications with ViewPort
Andy Lindsay (Parallax)
Posts: 1,919
Propeller + PC Applications with ViewPort
Propeller Education Kit Lab Series
Download: ·Full PDF &·Example Code (v0.7)
More Info: Propeller Education Kit & PE Kit Labs
Additional Material for v0.7 draft:
Display Microphone Input with Oscilloscope and Spectrum Analyzer
Draft Notice
Below is an excerpt from the partial draft, posted in PDF format for feedback.· Please send comments post comments to this thread or send them to editor@parallax.com
Introduction
ViewPort is a graphical user interface (GUI) developed by Hanno Sander for use with the Propeller Microcontroller at run time.· It utilizes the Propeller chip’s multiple processor design by devoting one of its processors (cogs) to provide an information conduit between the Propeller and ViewPort running on a PC.· This information conduit is typically high speed serial over USB with communication at speeds up to 2 Mbps.· This high speed communication, and in some cases judicious use of other cogs, makes a variety of applications possible.· Here are a few examples:
·
········· 32-bit logic analyzer displaying all I/O pin states with sampling rates of up to 80 MHz
········· Multi-channel oscilloscope view displays voltage measurements, variable values, and/or I/O pin states over time
········· Signal analysis - spectrum, XY plots, Bode plots
········· Signal generator with dials, control switches, scroll bars and text fields to define signals generated by the Propeller chip
········· Display video streams from signals sampled by the Propeller chip + A/D converter··
········· Control system projects such as PID tuning and fuzzy logic systems
········· Simple program debugging with a variety of variable control and display options
·
The system is very flexible, in many cases allowing for two or more of the features to be used at the same time.· For example, the signal generator can be used with the signal analysis tools to make the PE Kit a portable electronics workbench.· Since separate objects (and the cogs they launch) handle the measurement storage and communication with ViewPort, you can use this “workbench” to perform signal analysis on application circuits and code you are developing with your PE Platform.·
·
In this lab, you will download and use ViewPort in its 30-day evaluation mode to learn some of the basics of integrating ViewPort into your applications. Topics include:
·
········· Adding the ViewPort communication conduit and sharing Spin program variables
········· Controlling signal attributes by using the GUI to determine Spin variable values
········· Displaying I/O pin states in the Logic Analyzer view and taking I/O pin signal measurements with the Digital Oscilloscope view
········· Controlling and monitoring I/O pins with pushbutton multi controls
········· Viewing harmonics of a signal with the Analog View’s Spectrum Analyzer.
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Post Edited (Andy Lindsay (Parallax)) : 8/24/2010 6:35:31 PM GMT
Propeller Education Kit Lab Series
Download: ·Full PDF &·Example Code (v0.7)
More Info: Propeller Education Kit & PE Kit Labs
Additional Material for v0.7 draft:
Display Microphone Input with Oscilloscope and Spectrum Analyzer
Draft Notice
Below is an excerpt from the partial draft, posted in PDF format for feedback.· Please send comments post comments to this thread or send them to editor@parallax.com
Introduction
ViewPort is a graphical user interface (GUI) developed by Hanno Sander for use with the Propeller Microcontroller at run time.· It utilizes the Propeller chip’s multiple processor design by devoting one of its processors (cogs) to provide an information conduit between the Propeller and ViewPort running on a PC.· This information conduit is typically high speed serial over USB with communication at speeds up to 2 Mbps.· This high speed communication, and in some cases judicious use of other cogs, makes a variety of applications possible.· Here are a few examples:
·
········· 32-bit logic analyzer displaying all I/O pin states with sampling rates of up to 80 MHz
········· Multi-channel oscilloscope view displays voltage measurements, variable values, and/or I/O pin states over time
········· Signal analysis - spectrum, XY plots, Bode plots
········· Signal generator with dials, control switches, scroll bars and text fields to define signals generated by the Propeller chip
········· Display video streams from signals sampled by the Propeller chip + A/D converter··
········· Control system projects such as PID tuning and fuzzy logic systems
········· Simple program debugging with a variety of variable control and display options
·
The system is very flexible, in many cases allowing for two or more of the features to be used at the same time.· For example, the signal generator can be used with the signal analysis tools to make the PE Kit a portable electronics workbench.· Since separate objects (and the cogs they launch) handle the measurement storage and communication with ViewPort, you can use this “workbench” to perform signal analysis on application circuits and code you are developing with your PE Platform.·
·
In this lab, you will download and use ViewPort in its 30-day evaluation mode to learn some of the basics of integrating ViewPort into your applications. Topics include:
·
········· Adding the ViewPort communication conduit and sharing Spin program variables
········· Controlling signal attributes by using the GUI to determine Spin variable values
········· Displaying I/O pin states in the Logic Analyzer view and taking I/O pin signal measurements with the Digital Oscilloscope view
········· Controlling and monitoring I/O pins with pushbutton multi controls
········· Viewing harmonics of a signal with the Analog View’s Spectrum Analyzer.
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Post Edited (Andy Lindsay (Parallax)) : 8/24/2010 6:35:31 PM GMT
Comments
This is one very polished and versatile application. I was astounded by the thought and finesse he put in this product.
Try it - you'll love it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH - Electronics: Engineer - Programming: Professional
Very useful for many needs.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
If you purchased ViewPort (after the 30 day trial), which version is most compatable with the Lab?
Which version is the free trial?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
Post Edited (Whit) : 10/22/2008 1:34:20 AM GMT
All versions of ViewPort work with Andy's lab.
After the 30 day free trial you will need to purchase a license key to keep using ViewPort- this funds further development and pays for support.
- $29 gets you a key with the same functionality as the trial, but the connection speed is limited to 115kbps. If you're currently paying for dial-up internet instead of broadband this option will suit you- slower and not as fun, but cheaper.
- $59 gets you a key with the same functionality as the trial- but you can use ViewPort for as long as you want.
- $129 gets you a key that allows you to completely customize ViewPort's interface via the Designer and the Plugin architecture. This is for people seeking to build PC/Propeller solutions, teachers, or anyone else who wants to get the most out of ViewPort/Propeller.
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
""·$29 gets you a key with the same functionality as the trial, but the connection speed is limited to 115kbps. If you're currently paying for dial-up internet instead of broadband this option will suit you- slower and not as fun, but cheaper.""
Does this mean ViewPort an online app or an .exe?
I·was ready to buy a·PC style Logic analyzer and then I saw this pop up a few days ago. Is this better? seems like it would be, accept most advertise SPI and I2C support. My primary focus would be for the Propeller, but can it be set up to monitor an SX or Stamp thru a Propeller.
Also does it require the ADC module for analog signals?, if so, when will product be available.
Thank you
Bill M.
ViewPort is an exe that you install to your PC. It comes with a bunch of tutorials and manual that should get you up to speed quickly- it's a very complete, capable product.
The huge advantage that ViewPort has over other instruments is that the "sensing" is done by the Propeller itself. You don't have to hook up leads to the Propeller's IO pins to measure their state. Also, you can graph a variable's value over time- this is great for debugging, tuning your code, etc...
Another huge advantage is that ViewPort is an application running on your PC- so sharing your measurements becomes much easier. You can take screenshots, save measurements to text files, csv files and even MATLAB. ViewPort even lets you "stream" to the filesystem, an ftp server, or as input to another application.
To measure an analog signal you need to bring the digital value to the Propeller. For electrical signals you would use an ADC, other sensors can measure pretty much anything and communicate well with the Propeller: temperature, humidity, sound, light....
I'm very happy with the ADC 08100- it goes up to 100Msps and costs around $5. If enough people are interested I can put together a module- but would prefer that someone else do this.
I am working with Parallax on the upcoming PropScope- stay tuned...
Hanno
It looks good, but I am having a couple of problems with it - left you a message on your forum http://forums.mydancebot.com/viewtopic.php?f=4&t=16
Best,
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com - a new blog about microcontrollers
I run Propeller in many frequencies and my question on ViewPort is.
Is it posible to have in ViewPort TimeBase parameter to run it on diferent freqencies that 5 MHz
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
Yes, I've seen your work overclocking the Prop- quite impressive! First give it a try at 5MHz- that's what it's tested for- and that's what the tutorials are hard-coded for.
As long as the Propeller is still running at 80MHz (for example you're using a 10MHz crystal but a PLL multiplier of 8x) you just need to change the clkmode and xinfreq constants at the beginning of your program:
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
If you're running at other clock rates- like 100MHz, you'll need to adjust some hard-coded constants that help the Conduit set up the 2Mbps, 1Mbps, and 115kbps baud rates. Look for the comment that precedes these constants in the conduit.spin file.
Let me know if you need help/how you go!
Hanno
I run often.
_clkmode = xtal1 + pll8x
_xinfreq = 14_318_000
ELSE
_xinfreq = 15_000_000
Conduit.spin is one half pf problem.
But if I understand ViewPort it is hard-coded in Timings to 80 MHz TimeBase and if I run in other frequencies its Timings on Scren is not longer same as Timings I read from Propeller
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
That's fast- no problem at those speeds?
ViewPort supports 2 ways of acquiring data to be graphed- streaming variables at the chosen baud rate, and sampling the IO port at a given rate. The streaming mode will work for you because the timing is given by the baud rate which you can adjust in the conduit file. Unfortunately the sampling mode timing configuration is not currently user-accessible. So, if you take quick samples of the IO port with the QuickSample object with a Propeller running at a different rate than 80MHz your timing will be of. It'll be a constant factor- so might be usable for you right now. Look for a "clock rate" setting under preferences in the next release...
Hanno
This frequency give not problems at all.
_clkmode = xtal1 + pll8x
_xinfreq = 14_318_000
This frequency must have heatsink and many extra decopling capacitors on ProtoBoard
_xinfreq = 15_000_000
I run even more fast frequencies but with very big Heatsink
And yes I an interested in corect Timings on screen with other frequencies.
You said
""Look for a "clock rate" setting under preferences in the next release"". How long is to this release?
My proposo to not lose it to any freqency so it give also You ViewPort for Prop II
Hi Andy Lindsay (Parallax).
Sorry for litle of topic discusion from my
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
ViewPort also has dynamic cross-hairs as you mouse over the dso, video, spectrum, and lsa graphs- this feature for Andy!
And finally, you can now specify the clock rate of the Propeller to support bleeding edge Propellerheads like Sapieha!
If you must have these features now, then download here: http://mydancebot.com/setup4b.exe
I'll update the official download with an official 4.1 release when enough bugs have been fixed- so far I don't know of any- so send them my way!
Hanno
ps: Exciting things coming soon- I have to step through some spin code now [noparse]:)[/noparse]
You are most welcome... ViewPort is an excellent product, with outstanding support, I highly recommend it.
Best Regards,
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com - a new blog about microcontrollers
(1) If I buy ViewPort, will the Debbugging feature be free upgrade?
(2) What happens when the Prop2 comes available, will it be compatible, be upgraded or will I need to buy a new program?
(3) PropScope, will it be a part of Viewport? or separate program?. If it's a separate program, is there some sort of hardware that will be required too?
(4) Is there an idea on the ETA and possible cost of PropScope and possible hardware?
Thank you
Bill M.
Nice avatar!
1. ViewPort has a plugin architecture that allows me and 3rd party developers to extend the product. The license key mechanism allows charging for components, so some plugins will be free while others won't. The debugger will not be free.
2. Your ViewPort v4 license is good for all v4.x releases of ViewPort- I anticipate some bug fixes and small feature additions to come in v4.1, v4.2 releases over the next year (see above for ones already being pushed out due to user feedback) Very likely you'll have to pay to upgrade to a version that support Prop 2.
3. PropScope is a Parallax product that will replace their USB Oscilloscope. Parallax is building the hardware, I'm adapting ViewPort to power the software. This will be a very powerful and affordable oscilloscope, logic analyzer, spectrum analyzer and frequency generator. Plugins built for ViewPort will work for the PropScope software and vice-versa.
4. I'll let Parallax answer eta/cost of PropScope...
I've made up some pcb's that interfaces analog/digital circuitry with the Propeller and integrates with ViewPort. I've been somewhat busy, so haven't gotten a chance to take those further- if someone is interested in helping- let me know, could be a good business...
Hanno
It'd be nice if Parallax documented the protocol used for PropScope so that those of us not using a Windows based system can write some software to support it.
Sorry to hijack the thread [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
BradC, this would be up to Hanno.
Ken Gracey
Parallax, Inc.
ViewPort is programmed in .Net and I've taken the first steps to getting it to work on Mono. Mono makes it somewhat easy to support Mac and Linux if everything is in .NET I'm currently using the Propellent.dll, don't know if it's easy to replace that...
Nevertheless, the protocol will be published.
Hanno
The Parallax PropScope is an out-of-the-box oscilloscope/logic analyzer/spectrum analyzer/function generator that will be built and sold by Parallax. You plug it into your USB port, install the software and it completely replaces those types of instruments. It even comes with bnc leads. This will be the perfect product to set up electronic/physics/chemistry labs at universities and high school. Also ideal for students, hobbyist and professionals who currently use those types of instruments. It's powered by a Propeller, but I doubt many people will change the firmware. See above for Ken's response regarding price and eta.
The IO Dreamkit is a kit that you assemble yourself. I send you a pcb populated with the SMT components, you finish it however you want. It does not have a slick case or leads. It's similar to the Parallax Demo Board- you connect it to power/usb, place it on the middle of the table (or your robot) and stick wires into it. Hardware wise it'll have a very fast ADC, fast DAC, 8 medium speed ADC's, buffered output capable of driving small motors, variable power supply, and of course lots of IO pins. The ADC's will not have input conditioning- you need to give it a signal between 0-3.3/5 v. It's designed to complement ViewPort with a Propeller platform that can do analog things as well as power small digital things. Bundled with ViewPort, I would price it under $100. I've made up some pcb's of my rev1 design and apart from a couple layout bugs I'm very happy with it. It's the only thing I have on my desk- but it allows me to:
- measure signals up to 80msps, great for digitizing video, looking at ethernet traffic...
- control motors/lights with simple spin programs
- take long term measurements of battery state, temperature
- charge batteries, power small robots
- take measurements with all sorts of devices and manipulate the measurements in spin: ping, compass, temperature, sound, video
- much more- read the ViewPort manual for some ideas
I live in New Zealand and would prefer to improve the software rather than managing the logistics of hardware components- so if someone would like to help take on the manufacturing part let me know!
Hanno
Quicksample must run in the first cog! ViewPort stops and restarts this cog remotely to support triggers. If you have something else running in this cog, like your pwm code, it'll get overwritten with quicksample code.
John Abshier
List of known issues for ViewPort is linked at my site and here:
mydancebot.com/viewport/issues.php
Anybody have feedback to the PE Lab???
John Abshier
Page 11: "it slows down the Spin program variable data to some extent. I think that means it QuickSample slows down the display of the variable. I don't think that it means it slows down the user program's use of the variable.
Page 12: Do bit names have to start with an alpha? Parsing the comma separated labels (pg 13) could be difficult if labels started with a number.
Are labels or anything else in ViewPort case sensitive?
Colors for controls/monitored variables. I understand dark green--off/low and light green--on/high. Is this a good choice for color blind people?
Will try to finish lab tomorrow.
John Abshier
This is great feedback, thank you very much. We'll make sure to incorporate it into the next update. Yes, I will definitely add a strong warning about trying to use Parallax Serial Terminal and ViewPort at the same time, and agreed on the rest of your comments too.
I know that labels are case sensitive to the extent that what you enter is what will be displayed. Beyond that, I'm not sure. Hanno?
To adjust button color, click Designer and select Edit Mode. Then, for example, click the Autoscale button in the DSO and check the image0 and image1 options for the switch widget in the Designer Mode Properties. Those images (on.png and off.png) reside in this folder:
C:\Program Files\ViewPort\view\v4base
It should be possible to change colors of that switch widget with a photo editor.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Post Edited (Andy Lindsay (Parallax)) : 11/14/2008 2:25:26 AM GMT
John Abshier
John Abshier
Yes, bit name and variables in general must start with a letter. ViewPort prefers lower case. Clicking on .4 or .8 just changes the trigger point, you can drag it up/down to change the trigger set point. The GUI was designed to resemble traditional lab instruments but still be easy to use on a computer- what color scheme do you prefer for the on/off buttons?
Hanno