Henrick,
I tried your suggestion and it still vapour locks after the fifth "play" start button push.
This is from the PBPro manual:
i = 0 They don't tell you "i" needs to be a variable, I figured it out after awhile though.
REPEAT
PORTB.0[i] = 0 I changed the PORTB.0 to my RD variable name for my PORTA.3 pin and made the pin = 1 to start high
i = i + 1 I added the PULSOUT RD, 4 so that the pin would pulse LOW
UNTIL i > 7 I changed the ">" to "=" so that when i = 65535 it was done
It was the only example I could find where I could pulse a pin for a certain number of times.
All I'm doing is pulsing the RD pin low 65535 times. Each time the pin is pulsed low the i variable counts up
and when the count reaches 65535, it stops pulsing and continues on with what was next in the code.
I'm trying to use the GOSUB...RETURN so that I'm not using up space having 4 separate REPEAT....UNTIL's in the code.
I'm not trying to do any "array indexing".
Thanks, Jim




Bookmarks