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

<^< Adding the LED array | Course Index | Slow Simulation >^>

You will use two sets of switches, one for each binary number.

The output port has only eight bits, and so the biggest number that it can output is 1111 1111. This is equal to 255 in decimal. We are going to limit ourselves to inputting only seven bit numbers. This means that the biggest number we can input is 111 1111, which equals 127 in decimal. If we used bigger numbers, then we would overflow the capacity of the output.

  1. Click on the 'Inputs' button and select 'Switch Array' and drag it onto the System Panel above the LED Array
  2. To connect the Switch Array click on the box next to the 'Port' property and select 'PORTB' from the drop down menu.
  3. Now create another Switch Array using the same method. Position it under the LED Array and connect it to 'PORTC'.

<^< Adding the LED array | Course index | Slow Simulation >^>

Print - Search - Login

Page last modified on July 22, 2013, at 10:26 AM