3.1 Hardware Aspects

On a physical controller, many pins (or electrical contacts) can be configured to serve as a binary input or a binary output. Even a US$12 microcontroller IC (Atmel's ATMega128) has more than 40 pins of binary I/O.

A binary input pin is a pin where the electronics can ``sample'' the voltage. A sampled voltage of high (5V or 3.3V) is registered as a 1 in software, whereas a sampled voltage of low (0V) is registered as a 0 in software.

A binary output pin is a pin where the electronics can ``drive'' the voltage. When software writes a 1 to a binary output, most controllers will attempt to drive the output to a high voltage (5V or 3.3V). When software writes a 0 to a binary output, most controllers will attempt to drive the output to a low voltage (0V).

Note that the binary I/O of a controller is, more often than not, unsuitable for sensing common voltages or controling anything directly. Interface circuits are often needed to protect the binary I/O pins on controllers. Since this class is not an electronic class, such interface circuits are not discussed.

Copyright © 2006-02-15 by Tak Auyeung