SNAP-MICRO I Instruction manual Elenco® Electronics Inc.TM Rev A
9 When the program opens click the “view” menu and then the Options menu to display the Options panel (this may also automatically appear on star
10 On the ‘Serial Port’ page also select the appropriate serial COM port (the port where you connected the USB programming cable).
11 BUILDING THE MICRO CONTROLLER CIRCUIT 1. Snap Circuit® Boards are built one level at a time. The 70 post base grid is considered level 0. 2. Pa
12 6. Add level two to the grid. B C D E F 2 3 4 5 6 A G 1 7 8 9 10 1 1 1 1 2 2 2 2 2 1 2
13 7. Connect the serial cable to the Snap Circuit® Micro as shown below. Make sure the yellow lead is connected to pin 0, the black ground lead is
14 8. Using the program editor software, type in the following program: 9. Click the Run button to download the program to t
15 FLOW CHART PROGRAMMING AND SNAP CIRCUIT® BASICS. PROJECT 1: In Section 1 you built the basic Snap Circuit® board that will be used for most of t
16 Our first flowchart project will be to play the melody to Happy Birthday with and without flashing lights. Next, click the right m
17 The Play command has the following functions (Syntax) Function: Play an internal tune on output pin 2. PLAY tune, LED The tune constant (0 - 3)
18 WAIT Function: Pause for some time in whole seconds. Syntax: WAIT seconds - Seconds is a constant (1-65), which specifies how many seconds to pau
1 Index to Pages 2. About This Manual 3. SECTION 1: ELECTRONIC COMPONENTS 4-6 Connectors, Resistors, Switches, Diodes, Motors, Speakers, Tran
19 TESTING A FLOWCHART PROGRAM Before running a simulation for the first time the program editor should be adjusted as follows: First click View in
20 Every flowchart program should be tested and saved before it is converted to a down-loadable basic program. Make sure your audio is turn on and at
21 After filling in the proper information the window should appear as shown on the left. Click on the ‘Save’ button. The flowchart program w
22 Program Flow Control and Breakpoints Three new buttons appear on the main simulation panel. They are shortcut buttons for the Simulation men
23 Turn switch S1 to ON. Click on the ‘Run’ button or press F5 to download the new program. The new program should play the
24 PROJECT 2: ADDING AMPLIFIER & LOUDNESS CONTROL Modify the Snap Circuit® from the previous project to look like the circuit below. The varia
25 The advantage of a micro-controller is that the circuit need not change to produce different audio effects. By modification of the program, all
26 Project 3: The Value of Comments and Checking Program Length Sometimes it can be hard to remember the purpose for each step of the program. Comme
27 Checking Program Length. As programs become complex it is possible the micro-controller will run out of memory to store the program. Check the pre
28 Open the flowchart window and click on the ‘other’ button to open this screen. Use the ‘…’ button to create an empty box. Edit the box in the B
2 About this manual The Snap Circuit Micro-Controller manual is designed to quickly move the user into the world of micro-controllers without any he
29 Edit the basic program to use the variable b0. Start the simulation by clicking on the simulate button or pressing <CRTL> and F5 Keys at th
30 Project 4: Other Sounds The ‘sound’ command Syntax: SOUND pin,(note,duration,note,duration...) - Pin is a variable/constant (0-4), which specifie
31 This program is 2 bytes less and much easier to read with less jumping and only one label. Of course the comments will help later when you edit th
32 Project 5: The Tune Wizard The Tune Wizard allows musical tunes to be created for the micro-controller. Tunes can be entered manually or importe
33 After the song is loaded into the wizard, click on the Copy button to open the copy window. Answer yes to paste the tune directly into your p
34 The easiest way to import a ring tone from the Internet is to find the tune on a web page. Highlight the RTTTL version of the ring tone in the w
35 Project 6: Robotic Sounds This project explains the use of the random command and labels. Open your flowchart grid and construct the following flo
36 The next picture shows the same basic program after changes and editing to make it more readable. MAKING WORD DOCUMENT FOR YOUR LIBRARY: Using th
37 Project 7: SWITCHES AND DIGITAL INPUTS Digital Inputs A digital input can only be ‘on’ or ‘off’. Some examples of a digital inputs found in Snap
38 Load the program into the micro-controller. As shown in the flowchart, the first two lines make up a continuous loop. If t
3 Single Spacer (4) 2 Space connector (9) 3 Space Connector (4) 4 Space Connector (3) 5 Space Connector (1) 6 Space Connector (1) 7
39 PROJECT 8: COUNTING AND DISPLAYING EVENTS Modify the previous circuit to look like the one shown below. Create the fl
40 debug Syntax: DEBUG {var} - Var is an optional variable value (e.g. b1). Function: Display variable information on computer in Debug Window The
41 When you download the program the DEBUG window shown here should appear on your computer screen. The debug window opens automatically after a run,
42 PROJECT 9 - Using Serial Terminal with Sertxd The sertxd command sends a user defined serial string to the computer (at baud rate 4800). This ca
43 Each time used, go to Options and set up as shown here; Make sure the Baud Rate is set to 4800. Each time the S2 pushbutton is pressed the micro
44 PROJECT 10 - Using Serout, Serin, & Terminal Window Build the circuit shown here. B C D E F 2 3 4 5 6 A G 1 7 8
45 Open the program editor and make the following flowchart and program – Download the program and then turn off the micro-controller and move the se
46 Final circuit for talking to terminal window. Orange wire moved. Before doing project 11, try experimenting with t
47 PROJECT 11 – Checking for Errors In the previous project a number greater than 3 would still play a song. Add this loop to the previous flowchar
48 PROJECT 12 – THE DC MOTOR/GENERATOR Brushes Because DC motors use brushes and act as generators they may produce voltages that interfe
4 ELECTRONIC COMPONENTS First, consider voltage to be pressure on electrons to make them move in a wire. This is similar to water pressure in a pipe
49 Motor Test Circuit Download and run program with load (Fan) and without load. Time should be 10 seconds on e
50 PROJECT 13 – THE FLYING SAUCER Build the following Snap Circuit® … note the “+” on the motor. B C D E F 2 3 4 5 6 A G
51
52 PROJECT 14 – Analogue Sensors & Analogue to Digital Conversion (adc) Analogue Sensors: An analogue sensor measures continuous signals such as
53 readadc Syntax: READADC channel,variable - channel is a variable or a constant that sets the input pin (1,2,or 4) - variable is the name of the va
54 Download program and adjust RV for LED blinking rate. B C D E F 2 3 4 5 6 A G 1 7 8 9 10 To Computer 1 1 1 2 2 2 1 2 2 2 1 1 1 2 1 1 2 2 2 1
55 Edit the previous program to use 10-bit accuracy as shown here. readadc10 Syntax: READADC10 channel,wordvariable - channel is a variable or a cons
56 PROJECT 15 – Auto Calibrating Digital Voltmeter The Snap Circuit® shown above uses the base-emitter junction of transisto
57 Voltmeter Flowchart; In the Auto-Calibrate section the base-emitter voltage on Q2 is read on pin 2 of the micro-controller. Variable w6 is then a
58 Voltmeter Program; Make sure baud rate is at 2400 when using terminal window. The variable w5 stores the reading between 0000 and 1023 that re
5 The Variable Resistor ‘RV’ is really a resistor with a wiper arm that can slide from one side of the resistor to the other side. As the
59 PROJECT 16 – Battery Tester (Batteries under 4 volts) The Snap Circuit® shown above uses the voltmeter program to check bat
60 Battery Tester Program; Modify the voltmeter program in project 15 to be as shown above. This program adds an error message if the battery vol
61 Project 17, The Photo Resistor (RP) or Light Dependent Resistor RP is an example of an analogue sensor that drops from a very high resistance to
62 Draw the flowchart at the left and use the PICAXE® drop down menu to convert the flowchart to the basic program shown below. Download the program
63 Project 18, Introduction to Data Loggers. Technically speaking, a data logger is any device that can be used to store data. This includes many da
64 Create the following flowchart: In the above flowchart the data is stored in registers 80 to 127 with the “poke” command and retreived by using
65 Download the above program into the Snap Circuit Project 18 Light Intensity Logger. Press the F8 key to open the terminal window on your display.
66 Project 19, Green Power Meter or An Energy Cost Data Logger. A data logger can be used to store data on how much electricity is being used by a d
67 Program in Basic for Green Power Meter. The program will take 24 hours before it records the firs
68 Build the Green Power Meter Circuit shown here. Flashes once each minute when it records lamp as on. No Flash i
6 Build the circuit shown below. Snap Circuit® Boards are built one level at a time. The base grid is considered to be level 0. Parts placed directly
69 To test the Green Power Meter (GPM) change the second pause in the program from 59940 to 1 and download into the Snap Circuit® on the previous pag
70 PROJECT 20, Audio Amplifier and the Microphone (X1) Build the Snap Circuit shown below. For those familiar with electronic circuits and schematics
71 Go to control panel and double click the “Sounds and Audio Devices” icon. In the panel that opens, click the “Advanced” bar under the device vol
72 Project 21, Audacity® Run the installer program “audacity®-win-1.2.6.exe” from the Elenco® disc. Follow the instructions to install the progra
73 An Audacity® recording of the words “yes” and “no”. In speech recognition programs, computers analyze the digital data from words and use the co
74 Project 22, Investigating Sound of Clapping. Use previous setup to record the sound of two claps. Try recording two claps with different delays
75 A single clap from the previous page is shown here. < ±.1 .2 seconds or 200 milliseconds Amplitude wind
76 Expanded start of a clap. Data points highlighted by clicking “pencil” button. If –1 = 0, +1 = 255, and 0.0 = 127 then the dot
77 Project 23, The Clap-Data Program Consider the flow chart shown here as one method of recording and displaying data from the sound of two claps wi
78 Build the Snap Circuit® shown next and download the above program into the micro-processor.
7 The U21 Snap Circuit® module is designed to accept any 8 pin integrated circuit. If not already installed, remove the 8 pin integrated circuit (mic
79 Clap data taking circuit. After downloading the program, clear the download window and open the Terminal window under the
80 Project 24, Analyzing Clap Data Data shown in terminal window after four pairs of claps should be similar to this;
81 Three data groups for the start of a clap only have one data point in the start windows. There is no data outside of the center window for the en
82 Project 25, The Clap it ON, Clap it OFF Circuit Construct the following flowchart. Settle and Get Quiet Set window var
83 After converting the flowchart to a Basic program it should look similar to the following without the notes.
84 Before downloading, change the Snap Circuit® to match the picture below. Download into the following circuit and test by clapping. Clap at least f
85 Elenco® Electronics Inc. 150 Carpenter Ave Wheeling, IL 60090 (847) 541-3800 www.elenco.com Copyright © 2011 by Elenco® El
8 INSTALLING SOFTWARE AND PROGRAMMING CABLE 1. Install the Programming Editor software from the CD. 2. Insert the USB programming cable into a
Commentaires sur ces manuels