Книга: Advanced PIC Microcontroller Projects in C

2.1.5 The Reset

2.1.5 The Reset

The reset action puts the microcontroller into a known state. Resetting a PIC18F microcontroller starts execution of the program from address 0000H of the program memory. The microcontroller can be reset during one of the following operations:

• Power-on reset (POR)

• MCLR reset

• Watchdog timer (WDT) reset

• Brown-out reset (BOR)

• Reset instruction

• Stack full reset

• Stack underflow reset

Two types of resets are commonly used: power-on reset and external reset using the MCLR pin.

Power-on Reset

The power-on reset is generated automatically when power supply voltage is applied to the chip. The MCLR pin should be tied to the supply voltage directly or, preferably, through a 10K resistor. Figure 2.11 shows a typical reset circuit.


Figure 2.11: Typical reset circuit

For applications where the rise time of the voltage is slow, it is recommended to use a diode, a capacitor, and a series resistor as shown in Figure 2.12.


Figure 2.12: Reset circuit for slow-rising voltages

In some applications the microcontroller may have to be reset externally by pressing a button. Figure 2.13 shows the circuit that can be used to reset the microcontroller externally. Normally the MCLR input is at logic 1. When the RESET button is pressed, this pin goes to logic 0 and resets the microcontroller.


Figure 2.13: External reset circuit

Оглавление книги


Генерация: 0.555. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз