1、外文资料翻译 The single-chip microcomputer is the culmination of both the development of the digital computer and the integrated circuit arguably the two most significant inventions of the 20th century. Some employ the split program/data memory of the Harvard architecture, shown in Fig.A-1, others follow
2、the philosophy, widely adapted for general-purpose computers and microprocessors, of making no logical distinction between program and data memory as in the Princeton architecture, shown in Fig.A-2. In general terms a single-chip microcomputer is characterized by the incorporation of all the units o
3、f a computer into a single device, as shown in Fig3-5A-3. These two types of architecture are found in single-chip microcomputer. P r o g r a m M e m o r yD a t a M e m o r yC P U I n p u t & O u t p u t U n i t Fig. A-1 A Harvard type D a t a M e m o r y C P U I n p u t & O u t p u t U n i t Fig. A
4、-2 A conventional Princeton computer Read only memory (ROM) ROM is usually for the permanent, non-volatile storage of an applications program .Many microcomputers and microcontrollers are intended for high-volume applications and hence the economical manufacture of the devices requires that the cont
5、ents of the program memory be committed permanently during the manufacture of chips. Clearly, this implies a rigorous approach to ROM code development since changes cannot be made after manufacture .This development process may involve emulation using a sophisticated development system with a hardwa
6、re emulation capability as well as the use of powerful software tools. Some manufacturers provide additional ROM options by including in their range devices with (or intended for use with) user programmable memory. The simplest of these is usually device which can operate in a microprocessor mode by
7、 using some of the input/output lines as an address and data bus for accessing external memory. This type of device can behave functionally as the single chip microcomputer from which it is derived albeit with restricted I/O and a modified external circuit. The use of these ROM less devices is commo
8、n even in production circuits where the volume does not justify the development costs of custom on-chip ROM; there can still be a significant saving in I/O and other chips compared to a conventional microprocessor based circuit. More exact replacement for ROM devices can be obtained in the form of v
9、ariants with piggy-back EPROM (Erasable programmable ROM ) sockets or devices with EPROM instead of ROM . These devices are naturally more expensive than equivalent ROM device, but do provide complete circuit equivalents. EPROM based devices are also extremely attractive for low-volume applications
10、where they provide the advantages of a single-chip device, in terms of on-chip I/O, etc. with the convenience of flexible user programmability. Random access memory (RAM) RAM is for the storage of working variables and data used during program execution. The size of this memory varies with device ty
11、pe but it has the same characteristic width (4,8,16 bits etc.) as the processor ,Special function registers, such as stack pointer or timer register are often logically incorporated into the RAM area. It is also common in Harvard type microcomputers to treat the RAM area as a collection of register;
12、 it is unnecessary to make distinction between RAM and processor register as is done in the case of a microprocessor system since RAM and registers are not usually physically separated in a microcomputer. Central processing unit (CPU) The CPU is much like that of any microprocessor. Many application
13、s of microcomputers and microcontrollers involve the handling of binary-coded decimal (BCD) data (for numerical displays, for example) ,hence it is common to find that the CPU is well adapted to handling this type of data .It is also common to find good facilities for testing, setting and resetting
14、individual bits of memory or I/O since many controller applications involve the turning on and off of single output lines or the reading the single line. These lines are readily interfaced to two-state devices such as switches, thermostats, solid-state relays, valves, motor, etc. Parallel input/outp
15、ut Parallel input and output schemes vary somewhat in different microcomputer; in most a mechanism is provided to at least allow some flexibility of choosing which pins are outputs and which are inputs. This may apply to all or some of the ports. Some I/O lines are suitable for direct interfacing to
16、, for example, fluorescent displays, or can provide sufficient current to make interfacing other components straightforward. Some devices allow an I/O port to be configured as a system bus to allow off-chip memory and I/O expansion. This facility is potentially useful as a product range develops, si
17、nce successive enhancements may become too big for on-chip memory and it is undesirable not to build on the existing software base. Serial input/output Serial communication with terminal devices is common means of providing a link using a small number of lines. This sort of communication can also be
18、 exploited for interfacing special function chips or linking several microcomputers together .Both the common asynchronous synchronous communication schemes require protocols that provide framing (start and stop) information .This can be implemented as a hardware facility or U(S) ART (Universal (syn
19、chronous) asynchronous receiver/transmitter) relieving the processor (and the applications programmer) of this low-level, time-consuming, detail. t is merely necessary to selected a baud-rate and possibly other options (number of stop bits, parity, etc.) and load (or read from) the serial transmitte
20、r (or receiver) buffer. Serialization of the data in the appropriate format is then handled by the hardware circuit. Timing/counter facilities Many application of single-chip microcomputers require accurate evaluation of elapsed real time .This can be determined by careful assessment of the executio
21、n time of each branch in a program but this rapidly becomes inefficient for all but simplest programs .The preferred approach is to use timer circuit that can independently count precise time increments and generate an interrupt after a preset time has elapsed .This type of timer is usually arranged
22、 to be reloadable with the required count .The timer then decrements this value producing an interrupt or setting a flag when the counter reaches zero. Better timers then have the ability to automatically reload the initial count value. This relieves the programmer of the responsibility of reloading
23、 the counter and assessing elapsed time before the timer restarted ,which otherwise wound be necessary if continuous precisely timed interrupts were required (as in a clock ,for example).Sometimes associated with timer is an event counter. With this facility there is usually a special input pin , that can drive the counter directly. Timing components