Two PropBASIC questions....
JPTallman
Posts: 7
I'm using PropBASIC with BST. Whenever I try to make a FOR...NEXT loop, it tells me that my variable (index, indx, idx, x, whatever I name it) is an "invalid parameter".
Also, I'd like to program on my MacBook Pro (I use my mom's laptop to program instead), but it can't find the port that I plug the Propeller into. When I try to choose a port manually, it does not come up with any ports.
Any help with either issue would be greatly appreciated. Thanks!!
Also, I'd like to program on my MacBook Pro (I use my mom's laptop to program instead), but it can't find the port that I plug the Propeller into. When I try to choose a port manually, it does not come up with any ports.
Any help with either issue would be greatly appreciated. Thanks!!
Comments
XIN 5_000_000
PROGRAM Start
Start:
FOR idx = 1 TO 10
TOGGLE 0
PAUSE 250
NEXT
GOTO Start
END
That's an example of what I'll code, and this is what it tells me:
Oh! Another thing I was wondering. Is there any way to do PWM commands using PropBASIC? I know that you can with BS2, but I haven't found the command in PropBASIC.
Here is an example using an LED on pin 15 (change for your setup).
Bean
Each cog has two counters (countera and counterb) so for two pins just use countera for one and counterb for the other.
For more than two pins, you need to make additional TASKs to do it with the hardware counters. Let me know if you need more than two and I experiment with it.
Bean