Friday, August 28, 2009

microcontroller design printed circuit board

* Placed each component as close as possible to each other as this will reduce the looping and tracks and hence the parasitic and capacitive inductance will be reduced. Each loop or track will radiate and absorb energy once it is exposed to a variation of current, voltage or electromagnetic flux.

* Place the crystal or ceramic oscillator as close possible to the microcontroller. The tracks used to connect the resonator to the clocks should be as short and close as possible.

* As far as possible, do not use any socket between the MCU and the PCB. Use of socket introduces parasitic inductance and capacitance to the circuit.

* Use a 0.1uF ceramic capacitor across the power supply(VCC-Ground) of each integrated circuit as a high frequency decoupling device. The capacitor should be placed as close as possible to the integrated circuit.

* IO ports of MCU that are not used should be tied to Ground or connected to VCC through a high impedance resistor (100-200 kohm). This is to reduce the effect of voltage spike to the unused port that may cause wrong logic to be read by the MCU.

* Separate the grounding of digital and analog tracks.

* It is good to put a large ground underneath the MCU to create a stable tank to divert the noise to the ground.

* In critical application, use a reset IC that will reset the circuit once the power supply drops below a certain level.

* The power supply to the system should be stable by using large filtering capacitors and bypass ceramic capacitors and ensuring that the ripple is minimal(less than 100mV).

Microcontroller Design Software Consideration

* As far as possible, try to reconfigure the ports configuration, timer configuration and other registers regularly in the software loop. In a noisy environment, the setting of the registers may be flipped and changed from input to output and vice versa.

* Place a certain value in the RAM of the MCU and check for its integrity regularly. If the values changed, it means that the noise have altered the values and the integrity of the rest of the RAM is questionable. You may make a decision to reset the RAM to a predetermine value.

* Use a MCU with a hardware reset watchdog feature. A timer routine is placed in a certain part of the software where it will be refresh at a certain time. If this is not updated, it means that the program has runaway and a hardware reset should be triggered.

* Unused memory should be filled with "1111...." or "0000...."

* Unused program memory should be filled NOP(No operation) instruction codes. This is to ensure that if the program counter of the MCU is corrupted and jumped to these areas of the program memory, it will not end in endless loop.

No comments:

Post a Comment