Recent Changes - Search:

Introduction to Microcontroller Programming

About PICmicro Chips

Clocking Your PICmicro Devices

E-Blocks

Flowcode Step By Step

PICmicro Projects

Labs

Single Bit Input

<^< Set up the Flowchart | Course Index | Set up the Decisions >^>

  1. Double-click on the first (upper) Input box. This opens the Input Properties dialogue box.
  2. Type "Check the left switch!" in the 'Display name:' box.
  3. Click on the button to open up the 'Variable Manager' dialogue box.
  4. Hover over the variables label until the appears. Click on it, then click 'Add new'.
Create two variables, called "LEFT", and "RIGHT".
The 'left' variable will record whether the left indicator switch is pressed.
The variable 'right' will record whether the right indicator switch is pressed.
  1. Click on the 'LEFT' variable to highlight it, and then click on the 'Use Variable' button.
  2. This takes you back to the Input Properties box. You will use Port A as the input port. Click on the 'Single Bit:' radio button, and leave the selection in the box next to it as 0. This means that only the value of bit 0 of Port A will be transferred to the variable 'LEFT'. This means that 'LEFT' will always be either a 1 or a 0.
  3. Click on the OK button to shut down the Input dialogue window.
  4. Now double-click on the second (lower) Input box. Set up this Input Properties box in a similar way, to look like this:

<^< Set up the Flowchart | Course index | Set up the Decisions >^>

Print - Search - Login

Page last modified on May 07, 2013, at 08:38 AM