Shop OBEX P1 Docs P2 Docs Learn Events
PropellerLoader — Parallax Forums

PropellerLoader

Clock LoopClock Loop Posts: 2,069
edited 2009-06-12 22:53 in Propeller 1
No matter how hard I try, the OBEX propeller loader will not let its self be put into a new cog.

I tried to add this to the top of the propellerloader.spin file.


  long  cogon, cog                                      ' cog status
  long  ProStack[noparse][[/noparse]1100]                                    ' local stack

PUB Start (a, b, c, d, e, f) : okay
  
  stop                                                  ' stop cog for this object if running
  okay := cogon := (cog := cognew(Connect(a, b, c, d, e, f), @ProStack)) > 0


PUB stop

  '' Unload timer object - frees a cog

  if cogon~                                             ' if object running, mark stopped
    cogstop(cog)


'the rest of the code is the same as propeller loader.

PUB Connect(PinRESn, PinP31, PinP30, Version, Command, CodePtr) : Error

 





What am I doing wrong?

I try to lauch it by using this:

loader.Start(PropRst, PropRx, PropTx, 1, loader#LoadRun, @PropBinary)

Post Edited (Clock Loop) : 6/12/2009 7:36:16 AM GMT

Comments

  • BradCBradC Posts: 2,601
    edited 2009-06-12 07:55
    Not much to go on really. Does it work if you don't put it into a separate cog?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eccles : How do I open the door?
    Bluebottle : You turn the knob on your side
    Eccles : I haven't got a knob on my side!
  • Clock LoopClock Loop Posts: 2,069
    edited 2009-06-12 08:07
    BradC said...
    Not much to go on really. Does it work if you don't put it into a separate cog?

    Hmm, i don't know why I didn't think to try that..

    Will try.

    Yes it works if I just run

    Connect(a, b, c, d, e, f)

    instead of

    okay := cogon := (cog := cognew(Connect(a, b, c, d, e, f), @ProStack)) > 0

    I have done this with a different object and it works fine, no idea why this doesn't like it.

    Even if I run

    cognew(Connect(a, b, c, d, e, f), @ProStack) It still won't run.

    I checked the syntax in the prop manual and it shows the same thing.

    Post Edited (Clock Loop) : 6/12/2009 8:42:57 AM GMT
  • Clock LoopClock Loop Posts: 2,069
    edited 2009-06-12 22:28
    Anyone know why this doesn't work?
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-06-12 22:44
    I don't have a clue. PropLoad dosn't work for me ether. I tryed it out a couple of months ago.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Toys are microcontroled.
    Robots are microcontroled.
    I am microcontroled.



    If it's not Parallax then don't even bother. :-)

    Propeller SRAM TV driver winner: ==NOT COMPLEATED: 3 WEEKS UNTIL ENDING TIME==
  • Clock LoopClock Loop Posts: 2,069
    edited 2009-06-12 22:49
    PropellerLoader works for me, only when you don't launch it into a new cog.

    If you need help getting it to work, I can help you. Its a really cool feature to have.

    I just can't make it work in a new cog.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-06-12 22:53
    Oh, I couldn't get it to work altogather! I think that I wired it wrong, though. I will try it agian when I get my new PE kit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Toys are microcontroled.
    Robots are microcontroled.
    I am microcontroled.



    If it's not Parallax then don't even bother. :-)

    Propeller SRAM TV driver winner: ==NOT COMPLEATED: 3 WEEKS UNTIL ENDING TIME==
Sign In or Register to comment.