Shop OBEX P1 Docs P2 Docs Learn Events
What topics would be good reading to learn about using string data? — Parallax Forums

What topics would be good reading to learn about using string data?

Russ FergusonRuss Ferguson Posts: 206
edited 2007-03-07 22:33 in Propeller 1
I have an application that requires a number of fixed string messages.

It will be displaying text on several serial LCDs·from multiple (but dedicated) cogs.

It appears to me·that a data object should be used to store the strings.

What "topics"·would you recommend to learn more about storing and using strings?

Comments

  • Russ FergusonRuss Ferguson Posts: 206
    edited 2007-03-07 21:28
    Topic http://forums.parallax.com/showthread.php?p=636497·was helpful.

    Is there a·"best way" to manage string data that is used by multiple cogs?

    Is·a DAT object copied to the memory of every cog that uses it?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-03-07 21:41
    The easiest is to place all code that needs to access it in the same object so the data is in thier scope, then place them in the DAT section with labels.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Russ FergusonRuss Ferguson Posts: 206
    edited 2007-03-07 21:57
    Exercise 7 in the manual shows how to stop and restart cogs using new object variables.

    It looks like I need to follow that example in sending string data out to devices via the next available cog.

    Any recommendations?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-03-07 22:17
    I think you are making it out to more complicated than it needs to be. Write some code to handle the LCD interface, start it up with a pointer to a buffer, then use the first location as a flag indicator between the supplier and the interface to indicate the status of the buffer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Russ FergusonRuss Ferguson Posts: 206
    edited 2007-03-07 22:33
    Ok - I'm going to need to spend some time experimenting with pointers for my string data.

    I'll take one step at a time!

    Russ
Sign In or Register to comment.