ME Labs, Inc. 719-520-5323 |
ME Labs, Inc. | 1-719-520-5323 | Example Program - FOR.pbpPICBASIC PRO program demonstrating FOR..NEXT Command. Prints series of numbers showing STEP facility.' Name : FOR.pbp ' Compiler : PICBASIC PRO Compiler 2.6 ' Assembler : PM or MPASM ' Target PIC : 12F, 16F, 18F ' Hardware : Non specific ' Oscillator : internal or external ' Keywords : FOR, NEXT, SEROUT, STEP ' Description : PICBASIC PRO program demonstrating FOR..NEXT Command. ' Prints series of numbers showing STEP facility. ' Include "modedefs.bas" ' Include serial modes SO Con 0 ' Define serial output pin B0 Var byte B1 Var byte mainloop: For B0 = 3 To 1 Step -1 ' Countdown step size For B1 = 0 To 10 Step B0 ' Count to 10 (or so) Serout SO,N2400,[#B1," "] Next B1 Serout SO,N2400,[13,10] ' End of line Pause 100 ' Delay Next B0 Goto mainloop End Download the program file. |
Copyright 2019 ME Labs, Inc. PO Box 8250 Asheville NC 28814 (719) 520-5323 (719) 520-1867 fax email: support@melabs.com |
|