Shop OBEX P1 Docs P2 Docs Learn Events
data arrays and t.v. — Parallax Forums

data arrays and t.v.

mosquito56mosquito56 Posts: 387
edited 2009-04-28 22:22 in Propeller 1
Given the following code

repeat index from 0 to 5
·· r:=byte[noparse][[/noparse]@value][noparse][[/noparse]index]
· dec(r)



data

·value byte 0,1,2,3,4,5


Works fine with the propterminal but when put into the t.v. object it does really strange things.
Returns· 0022224444.

The dec subroutine of both are identical.· Any ideas why this doesn't work?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······

······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
········

Comments

  • CassLanCassLan Posts: 586
    edited 2009-04-28 19:37
    Using the code below I get an output of, 012345
    CON
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    OBJ
      text  : "tv_text"
    
    VAR
      byte r
      byte index
      
    PUB start | i
      text.start(12)
      'Given the following code
     
      repeat index from 0 to 5
        r:=byte[noparse][[/noparse]@value][noparse][[/noparse]index]
        text.dec(r)
     
     
     
    dat
     
     value byte 0,1,2,3,4,5
    


    Also if I switch to TV Terminal I get the same expected output.

    Can you paste your exact code?

    Rick
  • mosquito56mosquito56 Posts: 387
    edited 2009-04-28 19:47
    no exact code, I have tried so many iterations on the theme. Yours is where I started. I tried byte, word, long, combinations of each etc.

    I loaded doremi from the pe kits counters lab and tried to print the values, no luck.

    I put the·data first before the t.v. info, last after the t.v. info. No luck



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
  • CassLanCassLan Posts: 586
    edited 2009-04-28 21:26
    If your saying that when you load the above code into the propeller, if you dont see 0,1,2,3,4,5 on your TV but some other numbers, then I would suggest replacing your TV_Text driver with a new one, like re-downloading the Propeller tool from the Parallax website.

    Rick
  • mosquito56mosquito56 Posts: 387
    edited 2009-04-28 22:22
    Yep, that got it. I ran the above in the prop. ver 1.2.5 and it worked. thanx much

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
Sign In or Register to comment.