Microprocessor Interfacing - v1.05 - J R Smith3
You should now be familiar with the BASIC MICRO 'ATOM' microcontroller. It is based onthe 16F876 PICMicro MCU.It has 8K of FLASH memory used for storing programs, 384 bytes of RAM for storing thevariables used in programs and 256 bytes of EEPROM that can store data when the power isremoved.What can a device like this do?It turns out that it can do almost anything. However it does have two fundamental limitations- speed and complexity.The internal cycle time (200 ns) and the time taken to execute instructions (of the order of 30 µs) both limit how rapidly the ATOM can respond to external events. This limitation can beovercome for short periods by using external circuitry with a faster response. However forcontinuous operation the speed is ultimately limited by the instruction execution time.Consequently the ATOM is simply too slow for some tasks (e.g. real time, high fidelity, audioprocessing).The limited space available for program and variables also imposes an eventual upper limit onthe complexity of tasks that the ATOM can reasonably handle. However you are unlikely toapproach this limit. I have written large programs (>20 pages of code) that still fit into the 8Kmemory.Physicists are interested in the behaviour of the real world, however the parameters of interestdon't occur in the form of binary signals with voltage levels compatible with the binary logicof microcomputers. Consequently transducers are used to convert various physicalparameters to and from suitable electrical signals.These notes aim to provide an introduction to the• interfacing computers to the real world• some common transducers• various techniques used to convert between analogue and digital variables• techniques for synchronising a microcomputer with real world eventsSuitable circuits and programming examples will be presented wherever possible. They willoften be specifically for the ATOM28, but the basic principles are applicable to mostmicrocomputers or microcontrollers.