Shop OBEX P1 Docs P2 Docs Learn Events
Cog QA — Parallax Forums

Cog QA

Guy KGuy K Posts: 6
edited 2010-09-07 17:39 in Propeller 1
Are there special conditions COGID cant be used?? does there have to be multiple cogs started??

Why is the cogid returned as a slash \ insted of a 0-7

Running a 2x16 serial lcd

using OBJ - FullDuplexSerial.spin

Code...........LCD.tx(cogid)

Comments

  • jmspaggijmspaggi Posts: 629
    edited 2010-09-07 13:49
    Hi Guy,

    Not 100% sure, but LCD.tx send the byte value stored in cogID, right? What you want is to transform it as a char? So you should have to add 48 to it?

    Can you try LCD.tx(cogid+48)? Ascii code for "0" is 48....

    JM
  • Guy KGuy K Posts: 6
    edited 2010-09-07 17:33
    JM

    That did it thanks for the help
  • kuronekokuroneko Posts: 3,623
    edited 2010-09-07 17:39
    Seeing that you're using FullDuplexSerial you might as well use LCD.dec(cogid).
Sign In or Register to comment.