28123 Parallax Inc, 28123 Datasheet - Page 141
28123
Manufacturer Part Number
28123
Description
TEXT WHAT'S A MICROCONTROLLER
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet
1.28123.pdf
(340 pages)
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
- Current page: 141 of 340
- Download datasheet (6Mb)
Example Program: ServoControlWithPushbuttons.bs2
This example program makes the servo’s horn rotate counterclockwise when the
pushbutton connected to P4 is pressed. The servo’s horn will keep rotating so long as the
pushbutton is held down and the value of
pushbutton connected to P3 is pressed, the servo horn rotates clockwise. The servo also
is limited in its clockwise motion because the
below 500. The Debug Terminal displays the value of
running.
' What's a Microcontroller - ServoControlWithPushbuttons.bs2
' Press and hold P4 pushbutton to rotate the servo counterclockwise,
' or press the pushbutton connected to P3 to rotate the servo clockwise.
' {$STAMP BS2}
' {$PBASIC 2.5}
duration
duration = 750
DO
IF IN3 = 1 THEN
ENDIF
IF duration > 500 THEN
ENDIF
√
√
√
√
√
duration = duration - 25
Enter the ServoControlWithPushbuttons.bs2 program into the BASIC Stamp
Editor and run it.
Verify that the servo turns counterclockwise when you press and hold the
pushbutton connected to P4.
Verify that as soon as the limit of
that the servo stops turning any further in the counterclockwise direction.
Verify that the servo turns clockwise when you press and hold the pushbutton
connected to P3.
Verify that as soon as the limit of
the servo stops turning any further in the clockwise direction.
VAR
Word
duration
duration
duration
duration
is smaller than 1000. When the
< 500 is reached or exceeded that
duration
> 1000 is reached or exceeded
variable is not allowed to go
while the program is
Related parts for 28123
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: