Page 132 - The Art of Designing Embedded Systems
P. 132

Hardware Musings  1 19


                        With watchdog timers and other circuits connected to reset inputs, be
                   wary of small timing spikes. I spent several frustrating days working with
                   an AMD part that sometimes powered up oddly, running most instructions
                   fine but crashing on others. The culprit was a subnanosecond spike on the
                   reset input, one too fast to see on a 100-MHz scope.
                        Homemade  battery-backed-up  SRAh4 circuits often contain  reset-
                   related design flaws. The battery should take over, maintaining a small bias
                   to the RAM’S Vcc pins, when main power fails. That’s not enough to avoid
                   corrupting the memory’s contents, though.
                        As power starts to ramp down, the processor may  run crazy for a
                   while, possibly creating errant writes that destroy vast amounts of carefully
                   preserved data in the RAM. The solution is to clamp the chip’s reset input
                   as soon as power falls below the part’s minimum Vcc (typically 4.75 volts
                   on a 5-volt part).
                        With reset properly asserted, Vcc now at zero, and the battery pro-
                   viding a bit of RAM support, be sure that the chip select and write lines to
                   the RAM are in guaranteed “idle” states. You may have to use a small pull-
                   up  resistor  tied  to  the  battery,  but  be  wary  of  discharging the  battery
                   through the resistor when the system is operating normally.
                        And be sure you can actually pull the line up despite the fact that the
                   driver will experience Vcc’s from +5  to zero as power fails. The cleanest
                   solution is to avoid the problem entirely by using a RAM with an active
                   high chip select, which you clamp to zero as soon as Vcc falls out of spec.
                        Despite our apparent digital  world,  the harsh  reality is that every
                   component we use pushes electrons around. Electrical specifications are
                   every bit as important to us as to an analog designer. This field is still elec-
                   tronic engineering tilled with all of the tradeoffs associated with building
                   things electronic. Ignore those who would have you believe that designing
                   an embedded system is nothing more than slapping logic blocks together.


                        Small CPUs
                        Shhhh! Listen to the hum. That’s the sound of the incessant informa-
                   tion processing that subtly surrounds us, that keeps us warm, washes our
                   clothes, cycles water to the lawn, and generally makes life a little more tol-
                   erable. It’s so quiet and keeps such a low profile that even embedded de-
                   signers forget how much our lives are dominated by data processing. Sure,
                   we rail at the banks’ mainframes for messing up a credit report while the
                   fridge kicks into auto-defrost and the microwave spits out another meal.
                        The average house has some 40 to 50 microprocessors embedded in
                   appliances. There’s neither central control  nor networking: each quietly
   127   128   129   130   131   132   133   134   135   136   137