Self Testing Code development

Martin HebelMartin Hebel Posts: 1,221
edited 2006-02-23 - 16:09:04 in Propeller 1
I'm helping with the·development of BS2 compatible higher level command for an object library, and and going to start with COUNT, PULSOUT and PULSOUT. Here's something that occured to me... I was thinking about the PULSIN instruction, coding and testing. I was mulling over how to make sure it was accurate and scaled properly, and perhaps use a BS2 to send a known pulse to be read... then it occured to me, why not simply read the PULSOUT of another cog to check it..... wow [noparse]:)[/noparse]

Think how else this could be applied - Get SEROUT working on one·cog and·create·SERIN and check·on another cog and so on... even for development, this is too cool.

Of course, needing an outside standard to verify they work too, but still....

-Martin

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel

Disclaimer: ANY Propeller statements made by me are subject to my inaccurate understanding of my limited time with it!
Southern Illinois University Carbondale -Electronic Systems Technologies
Personal Links with plenty of BASIC Stamp info
and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control

Comments

  • OzStampOzStamp Posts: 377
    edited 2006-02-22 - 22:08:32
    Hi Martin.

    New Count instruction··· Count pin ,sync, register

    Count on·"pin" ·while "·sync "·is high and store in register..

    Re the count instruction ..

    We need the facility to count for an indefinate amount of time.

    Possibly synced to another input that tells it to accumalate..

    Pulse rate 5HZ -40KZ max .. having 32 bit this should be cool and will

    be needed by many apps..

    Ronald Nollet
  • Martin HebelMartin Hebel Posts: 1,221
    edited 2006-02-22 - 23:17:00
    Hi Ronald,
    1st step will be to try to duplicate the BS2 as closely as possible to help those familiar with the BS2 get started doing common tasks. Along with that we'll shoot for a super-bs2 library with extended speed/functionality.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel

    Disclaimer: ANY Propeller statements made by me are subject to my inaccurate understanding of my limited time with it!
    Southern Illinois University Carbondale -Electronic Systems Technologies
    Personal Links with plenty of BASIC Stamp info
    and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control
  • Agent CobaltAgent Cobalt Posts: 88
    edited 2006-02-23 - 14:50:45
    I like the idea in your original post. I don't know how many times I've had to bring out another BASIC Stamp to "test" the output of another stamp or to serve as an input to the stamp. Having the ability to use a Cog as a means in which to test code would be very nice. Thanks for the idea. I'll remember that when I get a Propeller and start messing with it. burger.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truth can be dangerous... Trust can be deadly.
  • Martin HebelMartin Hebel Posts: 1,221
    edited 2006-02-23 - 15:29:44
    I actually did it last night. I developed a PULSOUT object, used a BS2 to verify the data was good. Then, I started work on PULSIN. I created a cog running the PULSOUT loop, sending a pulse on Pin A1, and tested/fixed my PULSIN code on the other cog reading Pin A0. It was pretty cool and simple! So, so far I have a PULSOUT (BS2 style), PULSOUT_1uS for better resolution, PULSIN (bs2 style) and PULSIN_1uS for better resolution, plus a PAUSE(ms).

    This should help Stamp users doing some common tasks, though it's written in Spin, and there are some limitations, such as minimum pulse width. It's be better of I had the time and energy to do it in P-ASM.

    Sorry, guys, don't mean to tease by posting this, but at least some of us will have experience to help out new users when it's released.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel

    Disclaimer: ANY Propeller statements made by me are subject to my inaccurate understanding of my limited time with it!
    Southern Illinois University Carbondale -Electronic Systems Technologies
    Personal Links with plenty of BASIC Stamp info
    and SelmaWare Solutions - StampPlot - Graphical Data Acquisition and Control
  • Agent CobaltAgent Cobalt Posts: 88
    edited 2006-02-23 - 16:09:04
    I don't mind getting "teased" by this kind of information because I know when I get my propeller, I'm going to have lots of questions and having people know what's going on and how it works will be great. burger.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truth can be dangerous... Trust can be deadly.
Sign In or Register to comment.