|
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 * Basic Loops * The LCD Display * Binary Numbers * Decisions * Goto (Connection Point) * 7-Segment Displays * Software Macro * Strings and Memory ## Introduction ## Set up the Equipment ## Exploring the Keypad ## Using String Variables ## ASCII ## Seeing ASCII ## Getting a Phone Number ## You try it ## 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 EEPROM<^< You try it | Course Index | A Simple Hi-Fi >^>(:nl:) This is a convenient point to introduce another facility that the PICmicro can offer you: Electrically Erasable Read Only Memory, or EEPROM. All PICmicro devices have Read Only Memory (ROM), Random Access Memory(RAM), and Electrically Erasable Read Only Memory (EEPROM). ROM is where your program is stored and can not be altered whilst the program runs. RAM is where your variables are stored and this can be written to and read from as your program runs, but the contents are lost as soon as the power is removed from the chip. EEPROM can be written to and read from as your program runs: but the contents are preserved when the power is removed. This means that the contents are available again the next time you use the device. EEPROM is useful in many situations where the settings a user makes need to be preserved for the next time the system is used. For example remembering the frequency a television channel is tuned to. With reference to the previous example: # Add an EEPROM component from the Storage menu to the System Panel. # Add a new Component macro to your program just after the LCD is updated with the key the user presses. In this Component macro use the EEPROM 'Write' macro using the variables 'PTR' as the memory location, and KEY as the data. You can see the window below. # Simulate your program. If you watch the EEPROM Flowcode component then you should see that as you enter numbers they are stored in the EEPROM memory. ![]() Reading data back from the EEPROM is very similar to writing data to it: you simply specify a variable where you want to place the data, specify the address you want to read it from. (: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 July 26, 2013, at 11:45 AM