Page 103 - Embedded Microprocessor Systems Real World Design
P. 103

asynchronous serial input or a three-wire synchronous serial interface for in-circuit
                  programming. Either way, you must do something similar to the PIC arrangement
                  if these functions are used on the board in normal operation.




                  Internal Peripherals


                  A  number  of  processors and  microcontrollers  have  built-in  peripherals.  These
                  usually  are  the  peripherals commonly used  in  many embedded designs. Nearly
                  every processor intended specifically for embedded systems includes at least one
                  timer. Other common peripherals include serial ports, DMA controllers, watchdog
                  timers, and interrupt  control  functions.  Be  sure you  take  into  account specific
                  restrictions of  the peripheral device in the microprocessor you are using.
                    As an example, the Atmel AT9OS8515 processor includes an 8-bit and a lGbit
                  timer. Both timers include a prescaler that can divide the input signal by 8,64,256,
                  or 1024. Both timers can be clocked from the internal processor clock or an exter-
                  nal pin. When using the external clock input, the signal is internally synchronized
                  with the CPU clock. Thus, the maximum frequency you can input to these timers
                  is about half  the CPU clock. If  you  are using an 8MHz 9088515, the maximum
                  timer frequency is a little less than 4MHz. If you’re using an 8MHz 90S8515 but
                  running it at GMHz, the maximum timer input frequency is about 3 MHz.
                    Contrast that with the Microchip PIC16C62. The PIC16C62 also has timers that
                  can operate from an external clock. The internal clock on the PIC devices is one
                  quarter the external input, so it would appear that the PIC clock rate (20 MHz in/
                  4MHz CPU) limits you to a slower input clock rate than the fastest Atmel AT9OS
                  clock rate  (8 MHz) . If  the external clock input is synchronized to the CPU clock,
                  that is true. However, the PIC devices have a mode in which the timer clock is not
                  synchronized to the internal CPU clock. In this mode, the clock input frequency
                  can be as high as 50 MHz. However, in this mode, the timer cannot be used for any
                  operations that require synchronization, such as PWM or capture/compare.
                    Most  embedded  processors include  pins  that  can  be  used  as external  edge-
                  sensitive interrupts.  Like  the  timers,  these  usually  are  synchronized to  the  in-
                  ternal processor clock, which limits the minimum pulse-width that will be reliably
                  recognized as an interrupt request.




                  Design Shortcuts


                  It is sometimes possible to simplify a design by taking some shortcuts with the hard-
                  ware. We’ll discuss a few such shortcuts in this section.


                  Hardware Design 1                                                    85
   98   99   100   101   102   103   104   105   106   107   108