Shop OBEX P1 Docs P2 Docs Learn Events
'REPEAT' problem? — Parallax Forums

'REPEAT' problem?

RsadeikaRsadeika Posts: 3,837
edited 2007-03-20 22:02 in Propeller 1
Maybe it is something that I am overlooking. The code snippet below, I am expecting the string to display five times, for me it only displays three times. When I change the value to 'repeat 2' it does not display anything. Is their something that I am missing?

Thanks

Ray

''deBugger.spin
''
CON
· _clkmode = xtal1 + pll16x
· _xinfreq = 5_000_000

OBJ
· ser: "Extended_FDSerial"

PUB main
· TestPrg

PUB· TestPrg
· ser.start(31, 30, 0, 57600)
· repeat 5
·· ser.str(string("This is a test !",10,13))
·· waitcnt(160_000_000 + cnt)

Comments

  • CJCJ Posts: 470
    edited 2007-03-20 19:22
    your first string is sent immediately upon boot, the second 2 seconds later, so you are probably missing them if you are switching to a terminal application, this can be remedied by writing the program to eeprom and reseting the prop once you have the other app open

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Parallax Forums - If you're ready to learn, we're ready to help.
  • RsadeikaRsadeika Posts: 3,837
    edited 2007-03-20 22:02
    Thanks CJ,

    Now, why·didn't I think of that, I put in a four second delay, and that seems to have solved the problem.

    Thanks
Sign In or Register to comment.