Propeller Application: Logic Analyzer
Paul Baker
Posts: 6,351
This is a program which turns the Propeller into a Digital Storage Scope (Logic Analyser). It is capable of displaying the output to a VGA monitor or TV. Follow the instructions in dscope.spin to compile the TV version.
There are two modes of aquisition: the fast version which has a sample rate of 150ns when the Propeller is running at 80MHz, and the slow version which has a sample rate of 225ns or greater.
Please let me know of any bugs you encounter and your comments as well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
There are two modes of aquisition: the fast version which has a sample rate of 150ns when the Propeller is running at 80MHz, and the slow version which has a sample rate of 225ns or greater.
Please let me know of any bugs you encounter and your comments as well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Comments
Kerry
This is pretty cool.
I noted that the colored lines for 08 and 09 do not line up the way the others do.
Sid
Or the same propeller running another cog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Nico Hattink
I'll take my digital camera into work tomorrow and take a couple screen shots for you.
Ym2413 and Nutson,
This program was developed with the idea of working alongside other programs in development on the same Propeller. I have not worked in this mode yet, so this is likely where the bug reports will fall. The idea is that it can be run with or without the user interface display. As a top object it will start the user interface, however when this object is a sub-object, the data aquisistion function are accessible directly for those programs you want your own display and not the scope's user interface.·Like I said, I haven't tested this mode, I will likely need to insert a couple routines to help facilitate this mode of operation. I could also release a stripped down version that has no display within it for those instances if there is enough interested in a bare-bones version.
Newzed,
The Help screen (shown at startup and accessible via F1 thereafter), explains which keys run the program. On startup, a fast aquire is performed, this is the dataset shown at the begining. The arrow keys, Page Up/Down, Home and End navigate through the dataset. F performs another fast aquisistion, S performs a slow aquisisiton. P enters the Preferences dialog where you can set the time base for slow aquisistion and the start trigger function.
The start trigger function instructs the aquisistion process to wait until a specified mask of pins achieves a specified state. This morning I added the last bit of code where if you specify a state which is never reached, you can press the Esc key to kill the aquisition process, before that you had to reset the propeller in that situation. The dialog for this is displayed only while aquisition occurs which is typically so fast you'll only see a quick blip of words in the upper left corner before the new waveforms are drawn.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Ive thought about your comments some more, what you are seeing is normal, most pins will be all 1 or all 0. The numbers in the lower left show the values for each waveform under the current time (the pink line down the center). If you want to see some interesting stuff, scroll down to the mid teens where the VGA signal is being generated, you'll see more interesting waveforms there. The waveforms generated for the TV when that driver is running are even more intersting.
Also there is line commented in the start routine, that if you uncomment will toggle pin 0. If you change the time base to $0000_0100 then do a slow aquisition, you see a nice square waveform on pin 0.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
You mentioned changing the time base .· There are four in the CON block - are you talking about StatusIdle?
Sid
Time base is set in the program itself in the <P>reference dialog.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
I have a few questions.
1. I don't have a VGA display, and am working with a b/w monitor. So for my situation I'm color blind. I did note every 4th line was 'thinner', so may be a different color?____ And the eleven 'zeros' (00000000000) below the left vertical line has some greying of the digits; what is the meaning of that?____
2. Why is the vertical line down the 'center' so wide?____ It is quite distracting. It's the one, if you Home, has the single '0' below it.
3. There is one item that seems not right. If you have a signal, like on pin 12, it goes off screen if you press S or F; it doesn't if Mask, Value or Time is changed. Means if you are trying to view pins 12 or higher, you have to scroll down quite a ways for the higher pins EACH TIME it is triggered.
4. I'm guessing in time there may be write up on this neat program. Like include obvious details like Home and End keys move the display accordingly. Might there be others (I've not taken a 'trip' through the source yet)?_____
Great project. Was something I was thinking of that MIGHT be workable; glad to know it is. By the way, what is the shortest time for sampling (in nanoseconds) possible?____
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
h.a.s. designn
1. The palette was chosen to help distinguish between the waveforms at a glance on a color display. If you are displaying on a B/W TV, you can choose the palette you think looks best. The data to change is the tv_palette values in the DAT section. Entry 0 is used for most text. Entry 1 is the inverse and used for text highlighting. Entry 2 is used for highlighting the current·nibble being edited in the preference dialog and the center line of the waveform. Entries 3-6 are used for the waveforms and entry 7 is used for the pin numbering and current time value. You can edit any/all of these entries to improve readability on a B/W TV. You may want to set entries 3-6 to be the same as entry 0, this will make all waveforms white. The binary number in the lower left is the value of the waveforms displayed at the centr line, these numbers are drawn using the same color as the waveform. Changing the waveform color in the TV_palette will change the color of the binary value display as well.
2. The center line is is used to signify the locatation of the present time. Since a text-only display driver was used, this line can only be the width of a character. For your purpose, I would change entry 2 to be a white foreground with a dim grey background. This will de-emphasize this line and make it not as distracting, a value of 4 for the background should work well.
Distilling the information I provided in the last two paragraphs, you may want to change you color palette to:
3. I could change the program so the first pin displayed stays the same after an aquisition if most people feel this is a more intuitive behaviour for the program.
4. I tried to make the program as intuitive as possible so a seperate write up wasn't nessesary. Since the VGA version is limited in the number of characters/line and number of lines. I had to limit what was shown on the help screen, besides the Home and End keys, there aren't really any other "hidden" functions. The exception to this is the manipulation of the program by another program, but I haven't tested this out yet and I know there are a few functions I need to add to make this possible.·I will release a new version with this functionality along with a demo program that illustrates how to use·it·in that capacity.
·· One of the design premises with the Propeller is that the documentation would be provided in the source code, this is to overcome the problem·that occurs when code revisions and documentation becomes out of sync. By incorporating the documentation into the code itself, these two parts should stay in agreement. As a·Parallax employee I am going to try to adhere to this model.
The shortest sample time is 150ns which is through the <f>ast aquisition. This is the shortest possible loop achievable on a single cog (3 assembly instructions (12 clock cycles)). Using·4 cogs·and doing a synchronized interleaved aquisition, this could be reduced down to 37.5ns, using 6 cogs, this could be reduced down to 25ns.·This may be desirable for a stand alone application, but one of the design goals was to have this program co-exist with other programs.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 9/20/2006 4:56:28 PM GMT
Here are the screenshots you requested. It was taken with line 90 uncommented (the pin toggler activated), slow aquisition with a time base of 0000_0100.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Comments/questions:
1. Could a character such as "|" (the up-shifted '\" key) be used for the vertical bar to make it thinner?___
Ah, that was a binary value on the lower left (was wondering why the odd count; info overload!). Didn't note the corrolation; color might have shown it.
2. Will try your suggestion on the center line 'coloring'.
3. Having the first pin displayed stay the same would be 'user friendly'. That was the Macintosh mantra I learned back in '84, when I got the first Mac. Learned a lot from Apple's "Inside Macintosh" book, about the size of a thick phone book. I'll 'stuff the ballot box' on having this feature.
4. Maybe reading the source through would have helped. Something to do yet. For some reason, the PgUp and PgDn seem opposite actions, where page up moves further to the RIGHT. Where, in a editor, scrolling up takes one to the top or beginning. Conventions, ha!
I do like the Parallax model/approach in Spin with the documentation following the code. But when using a (demo) program, what's available only on-screen may NOT cover enough. The user might not desire to plough through the source.
Thank you for the 'sample time' info. Looks like the fastest sample time could be about 40 MHz; good for many debugging applications. Not a glitch catcher, but very usable for a stand-along approach.
I do appreciate that once the Prop is initialized, all 32 pins are available for this analyzer to capture. Works, since the capture is internal, on-chip. Really a amazing concept for this Propeller to have so much capability.
Thanks again Paul.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
h.a.s. designn
But using the graphics version consumed most of the propeller's memory.
In regards to the PgUp/PgDn, I took the view of the time value, if I reversed the two someone else would say it more intuitive to do it the other way. It just depends on how you view the dataset in your mind's eye.
I'll change the startpin behaviour on the next version. In the interm, comment out line 434 (startpin := 0 in function new_dataset) and·your copy will·have this behaviour.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Looking forward to the more final version. Thanks Paul.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
h.a.s. designn
In the interm, use Graphics_Palette.spin to pick out the values for greyscale shades you prefer. I agree that the contrast between white and black is a bit stark.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 9/20/2006 10:09:45 PM GMT
Thanks for the 'switch' suggestion. But don't think it will work for my setup. Besides the iMac (CRT in old/original iMac case) there's a ThinkPad laptop. Have a PS/2 mouse port, but no keyboard or VGA in, which I'd sure like. No VGA monitor here.
May just have to breakdown and look for a bargain VGA monitor. Have seen some 17" for just around $100. And that would hog a lot of valuable desktop space. The Parallax LCD monitor is cute, but too small for these old eyes even with reading glasses.
But, am sure enjoying all the work that has been done on the Propeller since it's come out. Lots of good coding.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
h.a.s. designn
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
I changed only entry 2 to the suggested 07 and 04 for a first shot.
That provided a neat thin vertical line, with the horizontal traces highlighted the normal width. Very obvious, yet not distracting in b/w. The other was sort of like looking into a searchlight beam; joking, but it was not pleasant; maybe in color OK.
Strange effect on the left pin numbers. It appears like 'noise' running up or down there, but not noticable any where else on the screen. Maybe those numbers need to be 'whitened' some. Because I see that 'noise' in the binary values at the bottom left, on the greyed ones. Don't know if I noticed that before. No real complaint; just will check out changing other palette values.
I have printed out the source, so can now spend some time studying it and checking out other details for my b/w setup.
Appreciate the help, Paul....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
h.a.s. designn
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Sid
Andre, all I want to do is switch the monitor and keyboard from my PC to another microprocessor that has keyboard and VGA inputs.· Will the GCS62 handle this?
Their response was "No, it will not".
I have asked for clarification based on the info on their site.
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.