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

multithreading

rjo__rjo__ Posts: 2,114
edited 2013-11-06 18:15 in Propeller 2
Some of this is like reading Greek… if only I could read Greek.

I am using a Nano with add-on board from Dr. Potatohead. I have control of NTSC… now I want to have my NTSC code running as one of two tasks.
?

Thanks,

Rich

Comments

  • ozpropdevozpropdev Posts: 2,792
    edited 2013-11-02 20:01
    Rich

    I'd start with something like this
            org
    
            jmp     #ntsc_driver
            jmp     #main_code
    
    schedule    long  %%1111_1110
    
    ntsc_driver   settask    schedule
    
    
    

    This splits the COG time as 12.5% for video and 87.5% for your main code.
    Simply adjust the schedule balance to suit your application. :)

    Cheers
    Brian
  • rjo__rjo__ Posts: 2,114
    edited 2013-11-02 20:05
    Thanks Brian,
    Cheers!!!

    I get an extra hour of sleep tonight… we are warping time in the U.S.
    First thing in the morning.

    Rich
  • AribaAriba Posts: 2,690
    edited 2013-11-02 20:28
    Rich

    The NTSC_fire demo is an example for NTSC with an additional task. The fire calculation is done in its own task.
    See here

    Andy
  • rjo__rjo__ Posts: 2,114
    edited 2013-11-06 18:15
    Andy and Brian… I love the new Invaders and the fire demo… both work great. There are a couple of hooks in each that allow me to experiment with them, but the truth is that I don't understand the code the way I need to. I'm sure I could come up with a series of questions that would get me there, but I'm going to change directions and get some more cogs, so that I don't have to become one of the "best and brightest" just to get my silly little project up and running.

    You guys are great. Thanks.

    I sent an message to Ken… but he is obviously up to his eyebrows. Who do I talk to … to ask for an add-on board for the DE2 if there are any left?
    Rich
Sign In or Register to comment.