28123 Parallax Inc, 28123 Datasheet - Page 166
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: 166 of 340
- Download datasheet (6Mb)
Likewise, if you have to recalibrate your scale factor or offset, you can also just change
the
Example Program: ControlServoWithPotUsingConstants.bs2
This program makes use of aliases in place of almost all numbers.
' What's a Microcontroller - ControlServoWithPotUsingConstants.bs2
' Read potentiometer in RC-time circuit using RCTIME command.
' Apply scale factor and offset, then send value to servo.
' {$STAMP BS2}
' {$PBASIC 2.5}
scaleFactor
offset
rcPin
delay
servoPin
time
DO
LOOP
Your Turn – Using Constants for Calibration and Easy Updating
As mentioned earlier, if you change the I/O pin used by the
you can simply change the value of the
HIGH rcPin
PAUSE delay
RCTIME rcPin, 1, time
time = time */ scaleFactor
time = time + offset
PULSOUT servoPin, time
DEBUG HOME, DEC5 time
CON
√
√
directives at the beginning of the program.
Enter and run ControlServoWithPotUsingConstants.bs2.
Observe how the servo responds to the potentiometer and verify that it’s the
same as the previous example program (ControlServoWithPot.bs2).
Assigning an alias is what you do when you give a variable, constant or I/O pin a name
using
VAR
CON
CON
CON
CON
CON
VAR
,
CON
, or
185
500
7
10
14
Word
PIN
.
rcPin
constant declaration.
' Scale scaleFactor.
' Offset by offset.
' Send pulse to servo.
' Display adjusted time value.
HIGH
and
RCTIME
command,
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: