Programming 32-bit Microcontrollers in C: Exploring the PIC32

Day 12: Capturing User Inputs

The Plan

If analog inputs are the essence of the interface between an embedded-control application and the outside world, digital inputs are, sadly, the true foundation of the user interface. As wrong as this might seem, for a long time now we humans have been trained to reduce our interaction with them, the machines, to buttons and switches. Probably this is because the alternative, using speech, gestures, and vision, requires such a leap in the complexity of the interface that we have rather learned to accept the limitation and reduced ourselves to communicate essentially through ones and zeros. Perhaps this explains the attention and enthusiasm that some recent innovations are producing as pioneered by video games and mobile phone manufacturers; think of the Wii accelerometer-filled wand and the iPhone multitouch sensing screen, for example.

Today we will explore various methods to capture "traditional" user inputs by detecting the activation of buttons and simple mechanical switches, reading the inputs from rotary encoders, and eventually interfacing to computer keyboards. This will give us the motivation to investigate a few alternative methods and evaluate their trade-offs. We'll implement software state machines, practice using interrupts, and possibly learn to use a few new peripherals. It's going to be a long day, so be rested and ready to start at dawn!

Preparation

In addition to the usual software tools, including the MPLAB IDE, the MPLAB C32 compiler, and the MPLAB SIM simulator, this lesson will require the use of the Explorer 16 demonstration board and...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Vacuum Controllers
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.