Recent Changes - Search:

Introduction to Microcontroller Programming

About PICmicro Chips

Clocking Your PICmicro Devices

E-Blocks

Flowcode Step By Step

PICmicro Projects

Labs

Adding the Switches

<^< Set up the Outputs | Course Index | Basic Loops >^>

You are going to use switches to represent the heat sensors. A switch that is switched on is used to mimic a heat sensor that has triggered the fire alarm. You will use five switches to represent the five heat sensors.

  1. Click on the Inputs button and select the Switch Array Drag the switches into a suitable spot on the System Panel.
  2. Click once on the box next to the 'Count' property to change the value of the property, change the value to '5'. Ensure the component is connected to 'PORTA'
  3. Click once on the 'Step Into' button.
  4. The 'Simulation Debugger' window then appears, you can ignore this for now.
  5. Move the cursor over one of the switches and click. You will see the switch graphic toggle to a closed switch. This simulates causing a fire. click the Step Into button a couple more times to complete the program. You have just caused a fire, which has turned on that heat sensor. Notice that the LED array tells you, or the fire brigade, which sensor detected the fire.

The program is finished, and working.

<^< Set up the Outputs | Course index | Basic Loops >^>

Print - Search - Login

Page last modified on July 19, 2013, at 01:43 PM