interface ckt for demo

6
Interface ckt for demo TIP120 1K PIN 1 +9, +12 V GND 10K PIN 4 +5 V GND PIN 0 GND 330 Outputs Inputs

Upload: caleb-holmes

Post on 01-Jan-2016

28 views

Category:

Documents


0 download

DESCRIPTION

+9, +12 V. 1K. PIN 1. TIP120. GND. +5 V. 10K. 330. PIN 0. PIN 4. GND. GND. Interface ckt for demo. Outputs. Inputs. DEMO PROGRAM. '-------------------------------- ' demo.bas ' ' Stamp demo program 4-28-01 (wkd) '-------------------------------- start: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Interface ckt for demo

Interface ckt for demo

TIP1201KPIN 1

+9, +12 V

GND

10K

PIN 4

+5 V

GND

PIN 0

GND

330

Outputs Inputs

Page 2: Interface ckt for demo

DEMO PROGRAM

'--------------------------------' demo.bas' ' Stamp demo program 4-28-01 (wkd)'--------------------------------

start: b2 = 0 ' for button command b4 = 100 ' sound variables b5 = 80top: high 0 ' red led onloop1: ' check switch if in4 = 1 then loop1

Page 3: Interface ckt for demo

action: for b3 = 1 to 5 high 0 ' red led on low 1 ' green led off pause 500 ' wait 0.5 sec low 0 ' red led off high 1 ' green led on pause 500 next b3 low 0 ' both led's off low 1 pause 500

Page 4: Interface ckt for demo

music: sound 2,(b4,20,b4,20,b4,20,b5,100) pause 250 for b3 = 0 to 127 step 10 sound 2,(25,10,b3,10) next b3 pause 500motor: high 3 ' motor on pause 2000 ' wait 2 sec low 3 ' motor off pause 750finish: sound 2,(120,75,50,75,120,150) goto top ' start all over again

Page 5: Interface ckt for demo
Page 6: Interface ckt for demo

Numbering conventions

100 ‘ decimal

$64 ‘ hex

%01100100 ‘ binary

N = 15N = $0FN = %00001111

All these are the same