Recent Changes - Search:
<^< Set up the Equipment | Course index | Set up the Flowchart >^>

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 ## Set up the Equipment ##

Counting Sheep Badly ## Set up the Flowchart ## Create the Variables ## Set up the Calculation ## Loop Properties ## Set up the Input ## Set up the Output ## Adding the LED array ## Adding the Switches ## Simulation ## The Solution - Adding a Delay * 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

Counting Sheep Badly

<^< Set up the Equipment | Course Index | Set up the Flowchart >^>(:nl:)

Counting sheep, badly at first, but without falling asleep!

The plan is straightforward - when a sheep passes through the gate, it interrupts a light beam. This sends a pulse to the counting system, which then adds one to the total stored in the system. We will display this total on the LED Array. (The 7-segment display would be a much better output device. That's a later exercise!)

The plan seems straightforward - but there will be problems!

Note that there is a 'Beam Breaker' component based on the 'Collision Detector', although this will do a far better job, we want to stick to the basics so we will demonstrate the interruption using more basic methods.

(: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 August 14, 2013, at 03:49 PM