|
Introduction to Microcontroller Programming * Course Index * Introduction * About the Author * About this Course * Feedback * Course Navigation * Quick Course Navigation * How to use this Course * Acronyms Used and Course Conventions About PICmicro Chips * What is a PICmicro? * Microcontrollers * Digital versus Analogue * Inputs and Outputs * Memory * Programming * 16F1937 Architecture Clocking Your PICmicro Devices * Introduction * The Clock Circuit * Clock Settings * Clock Confusion E-Blocks * Introduction to E-blocks * Using E-blocks * E-blocks Boards Flowcode Step By Step * Introduction to Flowcode * Basic Flowcode Functions * Digital Outputs * Digital Inputs ## Set up the Equipment ## Equivalent Circuit ## Where's the Fire? ## Set up the Flowchart ## Variables ## Using Variables ## Set up the Outputs ## Adding the Switches * Basic Loops * The LCD Display * Binary Numbers * Decisions * Goto (Connection Point) * 7-Segment Displays * Software Macro * Strings and Memory * A Simple Hi-Fi PICmicro Projects * Introduction to PICmicro Projects * Construction Methods * Choosing a Power Source * Adding Inputs * Input Conditioning * Adding Outputs * Adding Drivers Labs * Introduction and Lesson Plan * 1. Output * 2. Delay * 3. Connection Point * 4. Calculations * 5. Loop * 6. Input * 7. Decision * 8. LCD * 9. Keypad * 10. Analogue + EEPROM * 11. Software Macro * 12. External Interrupt * 13. Timer Interrupt |
(:Summary:Contains the 'action' links (like Browse, Edit, History, etc.), placed at the top of the page, see site page actions:) (:comment This page can be somewhat complex to figure out the first time you see it. Its contents are documented at PmWiki.SitePageActions if you need help. :) * Print (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) * %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) * Login Variables<^< Set up the Flowchart | Course Index | Using Variables >^>(:nl:) # Right-click on the Input icon, and select 'Properties' from the menu. The following dialogue box appears. ![]() # This is the Input Properties dialogue box. Next we are going to add a 'Variable'. # But what is a variable? A variable is a place where we can store information - in particular, information that changes as our program runs: in this case, the number of the heat sensor that triggers the alarm. It might be sensor 1 that goes off, or sensor 5. We are going to use a variable called "SENSOR" (without quotation marks) to store which sensor has been triggered. # Click on the ![]() # Now hover over the word 'Variables' and ![]() # You are now asked for the name of the new variable. Type the name "SENSOR" (without quotation marks) and click on the OK button. This name now appears in the list of variables that your flowchart can use. # Double-click on the name of the variable to use it, or alternatively click and drag the name into the variable box. # You now see the Input Properties box again. Notice that you need to tell the system which port you are going to use to input the data the system needs. It is set to Port A at the moment, and we are going to leave it that way. In this case, the system needs to know what the heat sensors are doing, so each heat sensor will be connected to a different bit of Port A. Click on OK to close the Input Properties box. (:nl:)(:table style="clear:both":)
| |
(:Summary: Website page footer:)
Print - (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) Search - Login
Page last modified on May 13, 2013, at 03:48 PM