Download presentation
Presentation is loading. Please wait.
Published byQuentin Carr Modified over 9 years ago
1
Basic Stamp OEM module By Wilmer Arellano
2
2 The BASIC Stamp 2 OEM is a discreet component version of the BS2 which may be purchased in kit form. The male header provides the means to ‘plug-it’ into your own board, or connect to other boards. Regulated 5V (Vdd) Ground- 0V (Vss) 5.5 – 15V input (Vin) Reset Input (RES) P0-P15 I/O Power the board with EITHER: A) 5.5-15VDC on Vin. This will also provide 5VDC regulated output on Vdd. B) Regulated 5V Input on Vdd.
3
Using the breadboard (Socket board) The bread board has many strips of metal (copper usually) which run underneath the board. The metal strips are laid out as shown in orange. The long top and bottom row of holes are usually used for power supply connections. To use the bread board, the legs of components are placed in the holes (the sockets). The holes are made so that they will hold the component in place. The circuit is built by placing components and connecting them together with jumper wires.
4
220 Ohm OEM BASIC Stamp 2sx 5V Ground 9V
5
Connection 220 Ohm resistor should be connected to pin P4 of the OEM Basic Stamp 2sx. “+” (long) lead of LED should be connected to opposite side of the resistor. The other (short) lead of the LED goes to “-” 220 Ohm LED 9 V battery
7
' {$STAMP BS2sx} ' {$PBASIC 2.5} Green: 'Label Or point were you can RETURN LOW 4 'Set pin 4 an output pin and low voltage "0" PAUSE 1000 'Pause 1000 ms HIGH 4 'Set pin 4 an output pin and high voltage "1" PAUSE 1000 'Pause 1000 ms GOTO Green Flashing LED
8
' {$STAMP BS2sx} ' {$PBASIC 2.5} start: HIGH 0 HIGH 1 HIGH 2 HIGH 3 HIGH 4 HIGH 5 HIGH 6 HIGH 7 HIGH 8 HIGH 9 HIGH 10 HIGH 11 HIGH 12 HIGH 13 HIGH 14 HIGH 15 PAUSE 100 LOW 0 LOW 1 LOW 2 LOW 3 LOW 4 LOW 5 LOW 6 LOW 7 LOW 8 LOW 9 LOW 10 LOW 11 LOW 12 LOW 13 LOW 14 LOW 15 PAUSE 100 GOTO start Code to test your microcontroller
9
OEM BASIC Stamp 2sx Wiring diagram Note: - is connection to negative pole of the battery 220 Ohm Push button Buzzer LED OUT PIR Motion sensor 9 V battery COM port Microcontroller chip 15 KOhm
10
' {$STAMP BS2sx} ' {$PBASIC 2.5} Green: 'Label Or point were you can RETURN LOW 4 'Set pin 4 an output pin and low voltage "0" PAUSE 1000 'Pause 1000 ms HIGH 4 'Set pin 4 an output pin and high voltage "1" PAUSE 1000 'Pause 1000 ms DEBUG ? IN0 'Input the value of pin 1 PAUSE 1000 'Pause 1000 ms GOTO Green Flashing LED + Switch Input
11
Making Sound ' {$STAMP BS2sx} ' {$PBASIC 2.5} start: FREQOUT 1, 10000, 1000 PAUSE 1000 GOTO start
12
Making Sound ' {$STAMP BS2} ' {$PBASIC 2.5} start: HIGH 1 PAUSE 5 LOW 1 PAUSE 5 GOTO start
13
CAR 1 ' {$STAMP BS2sx} ' {$PBASIC 2.5} PAUSE 5000 HIGH 10 LOW 11 start: HIGH 4 HIGH 8 LOW 9 PAUSE 3000 LOW 4 LOW 8 PAUSE 3000 HIGH 9 PAUSE 3000 LOW 9 PAUSE 3000 GOTO start
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.