Analogue to Digital converters (ADC) and Digital to Analogue Converters (DAC) are required to convert between the various physical quantities (via transducers) and the TTL or CMOS-compatible signals of the microprocessor.
transducer analogue quantity ---------------------> electrical valueThe analogue quantity may be converted into an electrical signal as shown in the table:
temperature -> thermocouple weight -> strain gauge fluid flow -> flow meter velocity -> tachograph etc.The outputs of the transducers above may be very small (microvolts) or very large (volts).
Therefore, before converting to a digital value using the ADC, the transducer output must be processed.
The output of the transducer may be:
ADCs are commonly available in a range of specifications from cheap, 8-bit converters (costing less than 2 pounds) to high precision, low-noise, fast converters costing many hundreds of pounds.
An 8-bit ADC takes the input range (0 - 5 V) which represents the minimum and maximum values of the signal and divides this up into 256 equal parts.
minimum value = 0000 0000 B ($00) maximum value = 1111 1111 B ($FF)ADCs usually have a built-in microprocessor interface:
e.g. CA1 input = conversion done CA2 output = start conversion
e.g. 8-bit digital signal --------> analogue signalAt this stage, the analogue signal is normally in the range 0 to 5 volts.
To meet the required analogue signal level, the signal may be:
frequency motor speed etc.DACs are normally microprocessor-compatible but they may also be driven from the PIA (as in the ADC above).
There is an alternative way to access peripheral devices which some manufacturers have adopted. This is through the use of I/O mapped ports. For example, the Z80 microprocessor and the 80x86 family of processors adopt this method.
In the Z80, for example, there are 256 ports with addresses Port0 to Port255.
These ports are accessed using the normal address and data buses but there is an additional control signal which distinguishes memory accesses from port accesses.
For the Z80, this signal is called /MREQ which is '0' for memory accesses and '1' for port accesses.
To activate /MREQ, there are special Z80 instructions called IN and OUT.
In this way, the Z80 has 64k bytes of addressing space and 256 bytes of I/O space in addition. If more than 256 bytes of I/O is required, then a Z80 system can use memory-mapped I/O as well.