28123 Parallax Inc, 28123 Datasheet - Page 306

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
' -----[ I/O Definitions ]---------------------------------------------
Pb1Pin
Pb2Pin
PotPin
PhotoPin
SpkrPin
' -----[ Constants ]---------------------------------------------------
DelayRc
DelayReader
' -----[ Variables ]---------------------------------------------------
request
time
' -----[ Main Routine ]------------------------------------------------
DO
LOOP
' -----[ Subroutines]--------------------------------------------------
Display_Menu:
Get_Request:
Read_Pushbutton_1:
Read_Pushbutton_2:
GOSUB Display_Menu
GOSUB Get_Request
ON request GOSUB Read_Pushbutton_1, Read_Pushbutton_2,
DEBUG CLS, "MENU: ", CR,CR,
RETURN
DEBUGIN DEC1 request
request = request - 1
RETURN
DEBUG CLS, ? IN3
PAUSE DelayReader
RETURN
"1) Pushbutton 1", CR,
"2) Pushbutton 2", CR,
"3) Potentiometer", CR,
"4) Photoresistor", CR,
"5) Piezo Speaker", CR, CR
CON
CON
CON
CON
CON
CON
CON
VAR
VAR
Read_Pot, Read_Photoresistor, Beep_Speaker
3
4
7
9
11
100
1500
Nib
Word

Related parts for 28123