We are going to look at how we can use the input switches on our PICmicro to control the state of the LEDs.

You probably never thought that a light switch is particularly complicated. After all, it is either on or off. However, as we shall see, there is quite a bit to writing a program which will give us the same behaviour as a switch which controls a light.

Once we have done that we will look at ways in which we can make our light switch more intelligent, and even useful!