'REPEAT' problem?
Rsadeika
Posts: 3,837
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)
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.
Now, why·didn't I think of that, I put in a four second delay, and that seems to have solved the problem.
Thanks