28123 Parallax Inc, 28123 Datasheet - Page 142

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
LOOP
Your Turn – Software Stoppers
Servos have a built in mechanical stopper that prevents them from turning too far. If you
try to send a command like
corresponds to a
mechanical stoppers that limit the range of motion. By gently turning the horn, you can
feel when the servo’s internal gears run into this mechanical stopper. You can modify the
example program in this activity so that the BASIC Stamp limits the servo’s motion to a
range that is narrower than the limits imposed by the mechanical stoppers.
IF IN4 = 1 THEN
ENDIF
PULSOUT 14, duration
PAUSE 10
DEBUG HOME, DEC4 duration, " = duration"
IF duration < 1000 THEN
ENDIF
duration = duration + 25
Save ServoControlWithPushbuttons.bs2 under a new name.
Adjust the software limits imposed on the servo’s motion so that they are 650
and 850 instead of 500 and 1000.
Adjust the software imposed rate so that the
or decremented by 10 instead of 25.
Decide what differences you expect to see in the way the servo behaves when
you press the pushbutton.
Run the program and compare the actual results with your expected results.
Duration
PULSOUT 14, 2000
argument of 2000. This is because servos have built-in
, the servo will not turn to a position that
duration
variable is incremented

Related parts for 28123