Page 144 - Programming Microcontrollers in C
P. 144

Input/Output    129

                          similar to EEPROM and it is inexpensive enough to allow rather
                          large amounts of programmable memory on a microcontroller chip.
                          You will find chips with 30,000 bytes and more of FLASH and the
                          intent is to use these chips for production runs. The FLASH is
                          programmed as part of the production cycle. We will see many details
                          on programming FLASH memory in later chapters.
                              The architecture of Motorola microcontrollers is strictly Von
                          Neumann. That is, within the microcontroller chip, there is only one
                          data bus over which all program, data, and input/output must pass. In
                          a Harvard architecture system, each of these different data types will
                          have a dedicated bus over which the information will pass. Therefore,
                          the Harvard architecture microcontroller is able to access data, program,
                          and I/O simultaneously. The simultaneous availability of these different
                          data paths can result in a significant increase in overall processor speed.
                          It also increases the area of the microcontroller die and, hence, the cost
                          of the microcontroller. In general, most of the applications to which
                          the microcontrollers are directed do not require extreme speed. Thus,
                          the Von Neumann architecture is completely satisfactory.

            Input/Output

                              The Motorola microcontrollers use an architecture called memory-
                          mapped I/O. Each I/O device input and output registers, its control
                          registers, and status registers are mapped into memory locations. I/O
                          transactions require no special computer instructions. It is merely
                          necessary to know the memory locations of the pertinent registers and
                          the uses of the register bits to be able to handle any I/O function. Listed
                          below are brief descriptions of several microcontroller I/O peripherals
                          found on Motorola microcontrollers. Not all of these peripheral systems
                          are found on each microcontroller. It is possible to pick and choose
                          between needs for the several peripheral systems and select a
                          microcontroller that has exactly those peripherals required.

            Timer Subsystems
                              There are four popular timer systems that you will find on different
                          microcontrollers. The first is a general-purpose timer. Motorola refers
                          to the general-purpose timers as either 8- or 15-bit timers. These
                          timers are different. The 8-bit system contains a prescaler that counts
                          down from system clock. The output from the prescaler is fed into a
   139   140   141   142   143   144   145   146   147   148   149