09.02.2015 Views

Tab Electronics Guide to Understanding Electricity ... - Sciences Club

Tab Electronics Guide to Understanding Electricity ... - Sciences Club

Tab Electronics Guide to Understanding Electricity ... - Sciences Club

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Computers<br />

367<br />

When an I/O port “sees” its specific address on the I/O bus, it will activate<br />

for communication with the microprocessor. The microprocessor<br />

will “look” at the various I/O ports as it is instructed <strong>to</strong> do so by the<br />

running program. The functions of the I/O ports are defined by<br />

firmware or software.<br />

Programming Computers<br />

Generally speaking, computers can be programmed at three different<br />

levels. If you program the microprocessor directly using binary number<br />

commands, the process is called machine-language programming (MLP).<br />

This method is difficult and cumbersome, because the 16-bit digital<br />

commands are not easily recognizable <strong>to</strong> a human.<br />

The next programming level above MLP is called assembly-language<br />

programming. When using assembly language, each binary number command<br />

is replaced with an easier <strong>to</strong> understand mnemonic (pronounced<br />

“nih-monic”). For example, instead of programming with commands like<br />

0011010010011011, which is MLP, programming is performed with<br />

mnemonics like ADD A,B, which instructs the microprocessor <strong>to</strong> add<br />

the contents of the A and the B registers.<br />

For long, complex programs, various high-level languages are used.<br />

Common examples are Pascal, FORTRAN, APT, and many others. Highlevel<br />

program languages are easy <strong>to</strong> use because they are very much like<br />

human language. However, after the program is written, it must be converted<br />

in<strong>to</strong> MLP by a special computer program called a compiler.<br />

Computer Processing of Analog Signals<br />

When a computer needs <strong>to</strong> examine (or <strong>to</strong> output) a continuously variable<br />

signal (referred <strong>to</strong> as analog or linear), the analog signal must be converted<br />

in<strong>to</strong> digital “words” before the microprocessor can understand it. Special<br />

data acquisition I/O modules used for this purpose are called digital-<strong>to</strong>-analog<br />

(D/A) converters or analog-<strong>to</strong>-digital (A/D) converters. A/D converters change<br />

analog input levels in<strong>to</strong> equivalent digital numbers, understandable <strong>to</strong> the<br />

microprocessor. In contrast, D/A converters change digital words, from the<br />

microprocessor, in<strong>to</strong> equivalent voltage or current outputs.<br />

The process of converting analog levels <strong>to</strong> digital words, and digital<br />

words <strong>to</strong> analog levels, is called digitizing. To digitize an analog level, the<br />

A/D converter actually divides the level in<strong>to</strong> thousands of incremental

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!