28123 Parallax Inc, 28123 Datasheet - Page 134
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: 134 of 340
- Download datasheet (6Mb)
ACTIVITY #3: CONVERTING POSITION TO MOTION
In this activity, you will program the servo to change position at different rates. By
changing position at different rates, you will cause your servo horn to rotate at different
speeds. You can use this technique to make the servo control motion instead of position.
Programming a Rate of Change for Position
You can use a
this:
The
slowly counterclockwise until it gets to 10 o’clock. Because
FOR…NEXT
in the
pulse gets a little longer each time through the loop. Since the
does the position of the servo’s horn.
FOR…NEXT
make the servo rotate faster. For example, you can use the
FOR…NEXT
√
√
PULSOUT
with this code block:
FOR counter = 500 TO 1000
NEXT
Save the program.
Run the program and verify that it rejects values outside the appropriate range
for the servo.
loop, it increases by one each time through. The value of counter is also used
PULSOUT 14, counter
PAUSE 20
loops have an optional
DO
LOOP UNTIL duration > 499 AND duration < 1001
DEBUG "Enter pulsout duration:", CR
DEBUGIN DEC duration
IF duration < 500 THEN
ENDIF
IF duration > 1000 THEN
ENDIF
FOR…NEXT
loop causes the servo’s horn to start at around 2 o’clock and then rotate
command’s
DEBUG "Value of duration must be above 499", CR
PAUSE 1000
DEBUG "Value of duration must be below 1001", CR
PAUSE 1000
loop to make a servo sweep through its range of motion like
Duration
STEP
argument, which means the
argument. The
STEP
counter
STEP
argument can be used to
duration
argument to add 8 to
duration
is the index of the
changes, so
of each
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: