28123 Parallax Inc, 28123 Datasheet - Page 217

TEXT WHAT'S A MICROCONTROLLER

28123

Manufacturer Part Number
28123
Description
TEXT WHAT'S A MICROCONTROLLER
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28123

Style
Book
Title
What's a Microcontroller?
Contents
Whats a Microcontroller? Text
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
Lead Free Status / RoHS Status
Not applicable / Not applicable
Figure 7-13 shows a second example of the same process with the second subroutine call
(
Your Turn – Adding and Nesting Subroutines
You can add subroutines after the two that are in the program and call them from within
the main routine.
GOSUB Second_Subroutine
Add the subroutine example in the Figure 7-11 on page 207 to
SimpleSubroutines.bs2.
PAUSE 2000
GOSUB Second_Subroutine
DEBUG "Repeat main...", CR
Second_Subroutine:
RETURN
PAUSE 2000
GOSUB First_Subroutine
DEBUG "Back in main.", CR
First_Subroutine:
RETURN
DEBUG "
DEBUG "subroutine", CR
PAUSE 3000
DEBUG "
DEBUG "subroutine.", CR
PAUSE 3000
Executing second "
).
Executing first "
Figure 7-13
Second Subroutine
Call
Figure 7-12
First Subroutine
Call

Related parts for 28123