28123 Parallax Inc, 28123 Datasheet - Page 104
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: 104 of 340
- Download datasheet (6Mb)
Item-2
Players soon figure out that the delay from red to green is 1 second. After playing it
several times, they get better at predicting when to let go, and their score no longer
reflects their true reaction time.
The BASIC Stamp has a
random number:
√
√
For precision, you can use the */ operator to multiply by a value with a fraction to make
your answer more precise. The */ operator is not hard to use; here’s how:
1)
2)
3)
4)
Example: Let’s say you want to multiply the timeCounter variable by 3.69.
1)
2)
3)
4)
At the beginning of your code, add a declaration for a new variable called
value
pseudo random number sequence.
Just before the pause command, use the
new “random” value from the pseudo random sequence that started with 23.
RANDOM value
DEBUG "Delay time ", ? 1000 + value, CR
Place the value or variable you want to multiply by a fractional value before the */
operator.
Take the fractional value that you want to use and multiply it by 256.
Round off to get rid of anything to the right of the decimal point.
Place that value after the */ operator.
Start by placing timeCounter to the left of the */ operator:
Multiply your fractional value by 256: 3.69 X 256 = 944.64.
Round off: 944.64 ≈ 945.
Place that value to the right of the */ operator:
, and set it to 23. The value 23 is called the seed because it starts the
timeCounter VAR Word
value VAR Byte
value = 23
timeCounter = timeCounter */
timeCounter = timeCounter */ 945
RANDOM
command. Here is how to modify your code for a
RANDOM
command to give
' <- Add this
' <- Add this
' <- Add this.
' <- Add this.
value
a
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: