27297 Parallax Inc, 27297 Datasheet - Page 37
27297
Manufacturer Part Number
27297
Description
KIT STAMPWORKS WITH BS2-IC
Manufacturer
Parallax Inc
Datasheet
1.27297.pdf
(230 pages)
Specifications of 27297
Lead Free Status
Contains lead
Product
Microcontroller Accessories
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
- Current page: 37 of 230
- Download datasheet (3Mb)
Program: SW21-EX01-Flash_LED.BS2:
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Program Description ]---------------------------------------------
'
' Flashes an LED connected to P0.
' any BS2-family module.
' -----[ I/O Definitions ]-------------------------------------------------
AlarmLed
' -----[ Constants ]-------------------------------------------------------
FlashTm
' -----[ Program Code ]----------------------------------------------------
Main:
Behind the Scenes
Each of the BASIC Stamp’s I/O pins has three bits associated with its control. A bit in
the DIRS register determines whether the pin is an input (bit = 0) or an output (bit
= 1). If the pin is configured as an output, the current state of that pin is stored in
the associated bit in the OUTS register. If the pin is configured as an input, the
current pin value is taken from the associated bit in the INS register.
HIGH and LOW actually perform two functions with one command: the selected pin
is configured as an output (1 in the DIRS register) and the state bit is modified in
the OUTS register (1 for HIGH, 0 for LOW).
HIGH AlarmLed
PAUSE FlashTm
LOW AlarmLed
PAUSE FlashTm
GOTO Main
PIN
CON
0
500
This program will work, unmodified, on
' LED on P0
' delay 500 milliseconds
' turn the LED on
' turn the LED off
Related parts for 27297
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: