Page 148 - Understanding Automotive Electronics
P. 148

2735 | CH 4  Page 135  Tuesday, March 10, 1998  11:06 AM



                                         MICROCOMPUTER INSTRUMENTATION AND CONTROL                         4




                                         particular automotive system. Standard commercial I/O devices are available
                                         from the manufacturers of each microprocessor that are specifically configured
                                         to work with that processor. These I/O devices are implemented as an IC chip
                                         and are very versatile in application.  A typical such I/O device has two 8-bit
                                         data ports for connecting to peripheral devices, and an 8-bit port that is
                                         connected to the data bus of the computer.
                                              Figure 4.22 is a block diagram of a typical commercial I/O device. In this
                                         device there are two ports labeled A and B, respectively. These ports can be
                                         configured to act as either input or output, depending on the data in the data
                                         direction register. Normally the correct code for determining direction is
                                         transferred to the I/O device from the microprocessor via the system data bus.
                                              Whenever the microprocessor is either to transfer data to the I/O device
                                         or receive data from it, a specific address is generated by the processor. This
                                         address is decoded, using standard logic, to form an electrical signal that
                                         activates the chip select inputs to the I/O. In addition, the read/write (R/W)
                                         output of the microprocessor is activated, causing data to be received (read)
                                         from a peripheral device, or transmitted (write) to a peripheral device.
                                              This use of address lines to activate the I/O is known as memory-mapped I/O.
                                         In memory-mapped I/O, input or output of data is selected by reading from the I/O
                                         input address or writing to the I/O output address.


                                         INSTRUMENTATION APPLICATIONS OF MICROCOMPUTERS
                    Microcomputers can        In instrumentation applications of microcomputers, the signal processing
                    convert the nonlinear   operations are performed numerically under program control. The block
                    output voltage of some   diagram of a typical computer-based instrument is depicted in Figure 4.23. In
                    sensors into a linear volt-  this example instrument, an analog sensor provides a continuous-time voltage,
                    age representation. The   V , that is proportional to the quantity being measured. The continuous-time
                                          o
                    sensor output voltage is   voltage is sampled at times determined by the computer. The sampled analog
                    used to look up the cor-  voltage is then converted to digital format (e.g., 8 to 16 bits) using an ADC.
                    responding linear value   The digital data is connected to port A of the I/O device of the computer to be
                    stored in a table.   read into memory.
                                              The ADC  generates a signal when the conversion from analog to
                                         digital is completed. This signal is normally termed end of conversion (EOC).
                                         The EOC signal provides an interrupt signaling the computer that data is
                                         ready.
                                              The signal processing to be performed is expressed as a set of operations
                                         that is to be performed by the microprocessor on the data. These operations
                                         are termed the algorithm for the signal processing operation. The algorithm is
                                         converted to a set of specific computer operations that becomes the program
                                         for the signal processing. After the signal processing is completed, the result is
                                         ready to be sent to the display device. The digital data is sent through I/O to
                                         port B to the DAC. There it is converted back to sampled analog. The




                                         UNDERSTANDING AUTOMOTIVE ELECTRONICS                            135
   143   144   145   146   147   148   149   150   151   152   153