27297 Parallax Inc, 27297 Datasheet - Page 26
27297
Manufacturer Part Number
27297
Description
KIT STAMPWORKS WITH BS2-IC
Manufacturer
Parallax Inc
Datasheet
1.27297.pdf
(230 pages)
Specifications of 27297
Lead Free Status
Contains lead
Product
Microcontroller Accessories
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
- Current page: 26 of 230
- Download datasheet (3Mb)
The STEP option of FOR-NEXT is used when the loop needs to count in increments
other than one. If, for example, the loop needed to count even numbers, the code
would look something like this:
SUBROUTINES – REUSABLE CODE THAT SAVES PROGRAM SPACE
The final programming concept we’ll discuss is the subroutine. A subroutine is a
section of code that can be called from anywhere in the program. GOSUB is used to
redirect the program to the subroutine code. The subroutine is terminated with the
RETURN instruction. RETURN causes the program to jump back to the line of code
that follows the calling GOSUB.
In this example, the code in the My_Sub subroutine is executed and then the
program jumps back to the line PAUSE 1000.
Advanced programmers will take advantage of subroutines and the ON-GOSUB
instruction. ON-GOSUB works like ON-GOTO, except that the program returns to the
line that follows ON-GOSUB. This technique is very useful for creating
program structures as shown next:
FOR counter = 2 TO 20 STEP 2
NEXT
Start:
My_Sub:
Main:
statement 1
statement 2
statement 3
DO
LOOP
statement 1
statement 2
statement 3
RETURN
DO
LOOP
GOSUB My_Sub
PAUSE 1000
GOSUB Critical_Task
ON task GOSUB Task_1, Task_2, Task_3
task = task + 1 // 3
task manager
Related parts for 27297
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: