Shop OBEX P1 Docs P2 Docs Learn Events
Loading Lookup Tables from Spin DAT to PASM COG RAM? — Parallax Forums

Loading Lookup Tables from Spin DAT to PASM COG RAM?

DroneDrone Posts: 433
edited 2009-08-24 12:27 in Propeller 1
I have a PASM object running in a single cog called by SPIN that needs multiple (one instance but different each time) a DAT lookup table used in the PASM object. Given the limited amount of cog RAM, I want the calling SPIN to stop the PASM cog then restart it loading a different DAT lookup table from hub RAM into the called PASM object cog RAM depending on user input in the calling SPIN object. So the calling SPIN code would have multiple DAT tables that the user can specify to be loaded into the PASM object. Before reinventing the wheel, are there any examples of this? I'm new to PASM but making steady progress.

I don't have example code to debug using this approach yet. I do have PASM stand-alone DAT table lookup working thanks to some examples from Mike Green, thanks Mike smile.gif

Thanks for any feedback, David

Comments

  • localrogerlocalroger Posts: 3,452
    edited 2009-08-24 12:27
    Create your DAT block with a LONG (NOT RES) block for the table, and the tables in separate DAT areas. Before doing each COGNEW to start your cog, LONGMOVE the appropriate table into the reserved area of your cog image. That way it will simply be there when the cog restarts.
Sign In or Register to comment.