1 basic electronics voltage (v or e): potential difference between 2 points. volts. (+) - a lack of...
TRANSCRIPT
1
Basic ElectronicsBasic Electronics
Voltage (V or E): Potential difference between 2 points. Volts.• (+) - A lack of electrons• (-) – A surplus of electrons• When a circuit is formed, electrons will
flow to equalize out the 2 sides.Current (I): The measure of the flow
of electrons. Amps.Resistance (R): Opposition to
current flow. Ohms.Ohm's Law: I = V/R
2
3
ResistorsResistors
Devices used to insert resistance, or oppose current flow. Used to limit current flow.
Color codes are used to indicate the value.
4
From Appendix C
5
The LEDThe LED
LED: Light Emitting DiodeDiode: Device which allows current
to flow in only one direction.To operate, is must be installed
correctly with respect to polarity.
6
A regular LED can be damaged if current exceed 20mA (milliamps).
Apply ohm's law to find the resistor size that will limit current to 20mAwith a 5V supply.
I = V/R
7
LED Circuit SchematicLED Circuit Schematic
8
The BreadBoardThe BreadBoard
Breadboards are used to make connections between devices.
9
Building the CircuitBuilding the Circuit
10
Pictorial or Wiring DiagramPictorial or Wiring Diagram
11
Code to Blink LEDsCode to Blink LEDs
12
TaskTask
Perform Chapter 2 up to this point (page 52), including "Your Turn- Blink the other LED"
13
Additional – The Speaker/BuzzerAdditional – The Speaker/Buzzer
A small piezoelectric speaker is included with your kits.
A frequency can be sounded on it using the FREQOUT command.FREQOUT pin, duration, frequency• pin: Pin it is connected to.• duration: Length of time in milliseconds.• frequency: Frequency to play,
measured in Hertz (Hz).
14
Sound the Speaker for 1 second at 1000Hz
15
GroupGroup TaskTask
Write a program that will:• Display in DEBUG Window
"Stop! Police!"• Turn ON P12 LED• Sound a tone for ½ second at 1000Hz• Turn OFF P12 LED• Turn on P13 LED• Sound a tone for ½ second at 2000Hz• Turn off P13 LED• Repeat sequence
16
Individual TaskIndividual Task
Develop a program to act as a "Ray Gun" movie prop. Use appropriate lights and sound sequences.