28122 Parallax Inc, 28122 Datasheet - Page 171
28122
Manufacturer Part Number
28122
Description
KIT WHAT'S A MICRO:PARTS ONLY
Manufacturer
Parallax Inc
Datasheet
1.28123.pdf
(340 pages)
Specifications of 28122
Accessory Type
Parts Kit
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
- Current page: 171 of 340
- Download datasheet (6Mb)
P2. The key is to add
LOOP
' What's a Microcontroller - Ch5Prj02_ControlServoWithPot.bs2
' Read potentiometer in RC-time circuit using RCTIME command.
' The time variable ranges from 126 to 713, and an offset of 330 is
' needed.
' Modify so the servo only rotates from 650 to 850.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
time VAR Word
DO
LOOP
prevTime = time
HIGH 7
PAUSE 10
RCTIME 7, 1, time
time = time + 330
IF ( time > prevTime + 2) THEN
ELSEIF ( time < prevTime - 2) THEN
ELSE
ENDIF
PULSOUT 14, time
HIGH 7
PAUSE 10
RCTIME 7, 1, time
time = time + 330
IF (time < 650) THEN
ENDIF
IF (time > 850) THEN
ENDIF
PULSOUT 14, time
HIGH 13
LOW 12
LOW 13
HIGH 12
LOW 13
LOW 12
time = 650
time = 850
IF…THEN
blocks; an example is shown below.
' Read pot with RCTIME
' Scale time to servo range
' Constrain range from 650 to 850
' Store previous time reading
' Read pot using RCTIME
' Scale pot, match servo range
' increased, pot turned CCW
' Bi-color LED red
' value decreased, pot turned CW
' Bi-color LED green
' Servo holding position
' LED off
Related parts for 28122
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: