Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC522 Embedded Systems Introduction to Circuit Design.

Similar presentations


Presentation on theme: "CSC522 Embedded Systems Introduction to Circuit Design."— Presentation transcript:

1 CSC522 Embedded Systems Introduction to Circuit Design

2 CSC522 Hardware/Circuit Design You won’t be a circuit designer upon completion of this class –You will [hopefully] become comfortable working around hardware circuits –This is how software engineers become circuit designers, albeit sometimes bad ones More often than not, we become system integrators –Conversely, working with software is how hardware engineers become programmers, albeit sometimes bad ones We will consider the basics

3 CSC522 Hardware/Software Integration We will be studying hardware/software integration using the Basic Stamp development board

4 CSC522 The Basics (no pun intended)

5 CSC522 Electo-Static Discharge (ESD) Static electricity –It’s the shock you get when rubbing your feet across the carpet then touching the person next to you –It can destroy electronic components Ideally we work with hardware in a static safe lab – we are not working in an ideal situation here Therefore, prior to working with hardware you should touch a metal, grounded object prior to touching the hardware

6 CSC522 Power Make sure the power is OFF (unplugged) when you are putting components onto the board!!! Check your work carefully prior to supplying power to the board

7 CSC522 Supply Voltage Vdd – equivalent to the “+” terminal of a battery (Voltage Drain Drain) Vss – equivalent to the “-” terminal of a battery (Voltage Source Source)

8 CSC522 Solderless Breadboard (Proto Board) This is used to create circuits without having to solder parts or have special boards manufactured, thus the name –Used for prototyping circuits, thus the alternate name Rows on either side of the vertical center are connected together and thus are considered a SINGLE connection

9 CSC522 Solderless Breadboard (Proto Board) These 5 holes are connected together

10 CSC522 Resistor Resists the flow of electrical current –Some components don’t like a lot of electrical current –Creates a voltage drop across the resistor –Ohm’s Law: V = IR Amount of resistance is specified in ohms, “Ω” –Resistors come in many values Two leads (legs) Resistors are bidirectional –It doesn’t matter which way you insert them into the circuit

11 CSC522 Resistor 470 Ω First 3 color bands represent the value in ohms Last color band represents the accuracy in percentage Schematic symbol See: http://www.ealnet.com/m-eal/resistor/resistor.htm

12 CSC522 Light Emitting Diode (LED) One way current valve Important to insert them in the proper direction Color means nothing in terms of circuit connection Two leads (legs) –Anode (labeled “+”) –Cathode

13 CSC522 Light Emitting Diode (LED) + Cathode Anode Schematic symbol

14 CSC522 Push Button Simple input device Four leads (legs)

15 CSC522 Push Button 1,23,41,32,4 2 1 3 4 1,42,3 When pressed, the 1 is connected to 2 and 3, and 4 is connected to 2 and 3 When not pressed, 1 is connected to 4 and 2 is connected to 3 Schematic symbol

16 CSC522 Speaker Piezoelectric Speaker (beeper) Schematic symbol

17 CSC522 Activity Create a [very] simple circuit (see next slide) DO NOT APPLY POWER UNTIL YOU ARE DONE CONNECTING UP THE CIRCUIT!!! This one requires no software Board have a 3-way power switch –Position 0 – off –Position 1 – on but only to circuits –Position 2 – on to circuits and servo drivers

18 CSC522 A Simple Circuit 470 Ω VddVss One lead from each component plugged into same row

19 CSC522 Ice Breaker Build the following three circuits on the proto-board

20 CSC522 Ice Breaker Circuits/No Code 470 Ω VddVss 470 Ω VddVss 1,42,3 1,42,3 470 Ω VddVss

21 Circuits and Code CSC522 470 Ω P9 Vss HIGH 9 PAUSE 2500 LOW 9

22 Circuits and Code CSC522 220 Ω P9 Vdd 1,42,3 10k Ω Vss DO DEBUG ? IN9 PAUSE 250 LOOP btnpin VAR Byte btnwrk VAR Byte btnpin = 9 Main: PAUSE 5 BUTTON btnpin, 0, 200, 20, btnwrk, 0, No_Press DEBUG "*" No_Press: GOTO Main

23 Circuits and Code CSC522 Vss P9 FREQOUT 9, 1500, 2000

24 CSC522 Development Environment The Basic integrated development environment (IDE) has been installed on all computers –Parallax group in Start menu If you are doing this at home (or laptop) you should download the latest Basic Stamp IDE from www.parallax.com

25 Assignment – The “wordy” version Two buttons (call them B1 and B2) Three LEDs,1 yellow, 1 red, 1 green (call them Y, R, and G) System specification –Start in “home position” LEDs off –Press B1 one time Press B2 one time – flash Y slow Press B2 two times in succession – flash Y medium Press B2 three times in succession – flash Y fast Press B1 – return to “home position” –Press B1 two times in succession Press B2 one time – flash R slow Press B2 two times in succession – flash R medium Press B2 three times in succession – flash R fast Press B1 – return to “home position” –Press B1 three times in succession Press B2 one time – flash G slow Press B2 two times in succession – flash G medium Press B2 three times in succession – flash G fast Press B1 – return to “home position” –Press B1 four times in succession Press B2 one time – flash LEDs in order Y-R-G-Y-R-G-… Press B2 two times in succession – flash LEDs in order G-R-Y-G-R-Y-… Press B1 – return to “home positin”

26 Notes “one time”, “two times”, “three times” means button presses in “rapid” succession So for example –, B1, B2-B2,, B1, –, B1-B1-B1, B2,, B2, B1,

27 Deliverables A state-machine diagram depicting the operation of the system Source code A schematic diagram of the circuit A working demonstration on the Basic Stamp development board (in class)


Download ppt "CSC522 Embedded Systems Introduction to Circuit Design."

Similar presentations


Ads by Google