Shop OBEX P1 Docs P2 Docs Learn Events
Object Cooexistance — Parallax Forums

Object Cooexistance

bdickensbdickens Posts: 110
edited 2008-08-15 17:28 in Propeller 1
I keep tinkering with the propeller and enjoying the experience. A great chip for re-entering programming. But I have a basic question around object usage. My next project looks like it can use many of the pre-developed objects. In fact, with the inclinometer code just published, I have enough to do the project with "glue code". But how (without loading and testing it all) do I validate the resources ? If I load 4-5 different objects, is there a software, or quick way to check to see if they will all interoperate ?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-15 14:36
    Objects really need to be designed and documented properly for interoperability. There's no way to test them. A couple of factors help here. 1) The cogs (processors) are, for the most part, completely independent. There are only a few shared resources for a "resource" to mess up for others, like the system clock and most programs/objects do not change them. 2) The I/O pins are designed to be used by different cogs. As long as a cog treats them as inputs, they're not affected by that cog. If two cogs attempt to use the same I/O pins as outputs, nothing can be damaged and one cog will dominate. 3) The data areas within the "resource" are independent of other "resource"s.

    The quick answer is "try it" because it probably will work.
  • PavelPavel Posts: 43
    edited 2008-08-15 17:28
    Also, it's much easier build your application subsystem by subsystem, especially when you are using software that you did not write. If you take 5 objects, add the "glue" code and then it does not work, you have no idea what went wrong. On the other hand, if you hookup one object/device, verify that it works as expected and then add another object, you have much better knowledge of the system to diagnose and fix problems.
Sign In or Register to comment.