Shop OBEX P1 Docs P2 Docs Learn Events
The right tools help see what is wrong... — Parallax Forums

The right tools help see what is wrong...

Chris_DChris_D Posts: 305
edited 2009-10-06 17:15 in Propeller 1
Hi Guys,

While most of my posts are requesting help, I offering some general help this time.

I have been working lile crazy to finish up a CNC controller·I am making with 2 propellers and 2 other micros for the·contest at the end of the year.· Being a newbie to electonics and·also propellers, this has proven to be a big challenge for me.· Programming isn't too·bad as I have been·programming PCs for many years.·

Anyway, working with micros is problematic when trying to see what is happening.·As I am building a motion controller,·the obvious feedback is watching the machine move.· However, seeing very slight differences between·each of the axes during interpolated moves is next to·impossible.· So, I needed something·so that I·could see what is happening in the software - what the variables are currently set to etc..

Viewport (Can be purchased here at Parallax) is an outstanding tool to help with·programming/debugging propeller code - certainly money well spent.··While it is probably possible to get viewport to do much more than what I am doing with it so far, I also wanted to see port states·so that I could analyze them.·

So I also picked up an econimical logic analyzer.· This is like·a digitial storage scope that records a period of time showing the states of various pins·(up to 16 on my model).The one I puchases is the

Zeroplus model LAP-C1632 from microcontrollershop.com

This morning I ran some test files through my CNC control and was shown very clearly what I needed to see but couldn't with what i had available to me.· After seeing the timing of the outputs I now know I have rewrite my PASM code section to tighten up the timing between all the axes of motion.·

Anyway, the whole point of this discussion is that there are some very good and economical tools available that can help to provide you with useful information.· So, instead of pulling your hair out for weeks on end, save up a few bucks and pick·up these (or similar) tools. I am sure you experienced guys will read this and say "well duh", but for me these are some great revelations :-)

Chris
·

Comments

  • heaterheater Posts: 3,370
    edited 2009-10-05 15:07
    Not bad. The LAP-C1632 does 100MHz sampling of 16 channels with 32k sample buffer.

    For those on a budget there is alway the Propalyzer. It will sample 30 bits (I think) at 2Hz to 80MHz with I don't know what buffer size. For the price of a Propeller chip.

    http://forums.parallax.com/showthread.php?p=788230

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • HannoHanno Posts: 1,130
    edited 2009-10-05 19:26
    Thanks Chris for the wonderful compliment! I started writing ViewPort to debug my vision-guided balancing robot- great to see all the things people have used it for since! And yes, ViewPort includes a full logic analyzer to help you diagnose your port states- with flexible triggers, cursors and wide timescales- it can sample up to 80msps!
    Try out tutorial #1, read the manual about "quicksample", work through Andy Lindsay's excellent PE Kit, watch videos on my site, or just ask me...
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Download a free trial of ViewPort- the premier visual debugger for the Propeller
    Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
  • jazzedjazzed Posts: 11,803
    edited 2009-10-06 00:05
    heater said...

    For those on a budget there is alway the Propalyzer. It will sample 30 bits (I think) at 2Hz to 80MHz with I don't know what buffer size. For the price of a Propeller chip.

    http://forums.parallax.com/showthread.php?p=788230

    Thanks for the plug heater. Propalyzer snaps 32 bits during capture, but having anything running on bit 30/31 will very likely interfere with operation. Only 470 or so longs are captured at once which is a limit imposed by the COG and capture code. The maximum capture frequency is whatever the capture propeller is running. I recently added a requested feature to display the times according to the frequency specified by the user ... so, "if by some miracle" your propeller is running at 1GHz, you will be able to see 1ns resolution on the display.

    I've given up on a non windows .net version of the program though and plan to port it to Java for cross platform deployment since that is the path of least development resistance.
  • photomankcphotomankc Posts: 943
    edited 2009-10-06 04:53
    I'm actually working on something now to turn the Propteus board I have into a test board to use for just such work. I am using Hanno's viewport to get a 16Ch logic analyzer and I just finished up adding something similar to the old Radio Shack logic probe to the board as well. I connected that to the Propeller as well so later I can have the system work with that input to trap events and such instead of just LED outputs. With a little coding work I'm sure I can get a frequency counter/pulse counter out of it too. I can already hook it up to my other projects I2C and SPI busses and watch the activity using Viewport's LSA window. That way I don't have to burn up cogs in the device under test for Conduit/Quicksample.


    Edit to add:
    I also just ordered this the other day:

    www.circuitspecialists.com/prod.itml/icOid/10094

    I was trying to wait on the prop-scope but decided in the end I would appreciate not being tied to the PC for measurements and it seems to allow you to attach to the PC if you like. We'll see if it turns out to be a dud or not.

    Post Edited (photomankc) : 10/6/2009 3:13:06 PM GMT
  • HarleyHarley Posts: 997
    edited 2009-10-06 17:15
    Re: Viewport, YES, it is a fine tool if one has the cogs to spare.

    In the Logic Analyzer mode one must be aware that the actual trigger point is not a zero time but 100 or more nanoseconds to the left of zero. If this is no problem for the user, great. One fine tool and no additional equipment required.

    Many thanks to Hanno for providing this tool. yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
Sign In or Register to comment.