28123 Parallax Inc, 28123 Datasheet - Page 282

TEXT WHAT'S A MICROCONTROLLER

28123

Manufacturer Part Number
28123
Description
TEXT WHAT'S A MICROCONTROLLER
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

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
' -----[ Title ]-----------------------------------------------------------
' What's a Microcontroller - TerminalControlledDigitalPot.bs2
' Update digital pot's tap based on Debug Terminal user input.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ EEPROM Data ]-----------------------------------------------------
' -----[ I/O Definitions ]-------------------------------------------------
UdPin
ClkPin
' -----[ Constants ]-------------------------------------------------------
DelayPulses
DelayReader
' -----[ Variables ]-------------------------------------------------------
counter
oldTapSetting
newTapSetting
' -----[ Initialization ]--------------------------------------------------
oldTapSetting = 0
newTapSetting = 0
Windowpanes
Transmit →
Enter and run TerminalControlledDigtialPot.bs2.
Enter values between 0 and 127 into the Debug Terminal. Make sure to press
the enter key after you type in the digits.
Receive →
CON
CON
CON
CON
VAR
VAR
VAR
5
6
10
2000
Byte
Byte
Byte
' Set values of I/O pins
' connected to CLK and U/D.
' Delay to observe LED fade.
' Counter for FOR...NEXT.
' Previous tap setting.
' New tap setting.
' Initialize new and old
' tap settings to zero.
Figure 9-9
Sending Messages
to the BASIC Stamp
Click the Transmit
(upper) Windowpane
and enter the
numbers for the new
tap setting.

Related parts for 28123