Using MAXQ3210 as a microprocessor monitoring circuit

Abstract: The MAXQ3210 microcontroller can complete various microprocessor monitoring functions and supports functions including power-on reset, power sequencing, watchdog timeout, and input switch debounce. Depending on the application, the MAXQ3210 can also directly power the microprocessor. This application note describes how the MAXQ3210 works with 9V battery power and how to perform low-speed operation without an external clock crystal to implement several common functions of microprocessor monitoring circuits.

Overview When a microprocessor is used for large-scale system design, it usually requires the support of various external devices. These external devices provide multiple tasks support for the microprocessor: provide the microprocessor with a regulated power supply that meets the voltage and current requirements, monitor other power supply voltages, provide an external clock, control the power-up and power-down sequence, or perform other tasks. These external devices are often called microprocessor monitors and are ICs designed for special monitoring tasks.

Using a low-power microcontroller can replace the dedicated microprocessor monitoring circuit to support the above tasks. According to its performance, a microcontroller can provide services supported by multiple devices, and because the monitoring function can be programmed by software, it has great flexibility.

This application note describes the use of the MAXQ3210 low-power microcontroller with piezoelectric speaker driver, voltage regulator, and comparator to implement typical microprocessor monitoring functions. The MAXQ3210 can implement various functions in a stand-alone configuration. It is powered by a 9V battery and uses its internal low-speed oscillator to eliminate external clock circuits. The MAXQ3210's small package size (24-pin TSSOP) makes it ideal for traditional designs or other space-constrained products.

The battery-powered portable system MAXQ3210 has a built-in 9V to 5V conversion linear regulator, which is ideal for portable, battery-powered microcontrollers or microprocessor systems. Because the MAXQ3210 has low battery voltage detection, the system can provide intelligent management under low battery voltage conditions.

When working with a 5V microprocessor, as long as the power supply current required by the microprocessor is within the power supply range of the MAXQ3210 linear regulator (maximum value is about 50mA, please refer to the MAXQ3210 data sheet for details), the MAXQ3210 can directly use its voltage regulator The output pin REGOUT (Figure 1) of the device supplies power to the microprocessor. When the microprocessor current is very low, you can also set the MAXQ3210's port pins to standard high-level outputs (PD = 1, PO = 1) to directly power the microprocessor. Each port can provide at least 4mA of current with a voltage drop of less than 0.4V. As long as the total current of all port pins does not exceed the maximum rating (approximately 25mA, please refer to the data sheet for details), multiple port pins can be connected together to enhance the supply current. When the port is used to directly power the microprocessor, the MAXQ3210 can turn on and off the power of the microprocessor as needed, thereby extending battery life. Note: When using REGOUT to power the microprocessor, the power can still be turned on and off under the control of MAXQ3210, but an external FET or other switching device is required.

When the terminal voltage required by the supported microprocessor is not 5V (such as 3V, 2.5V or other), the REGOUT output of the MAXQ3210 can generate the voltage required by the microprocessor through the linear regulator. By using a linear regulator with enable / disable input, the MAXQ321 can still completely shut down the power to the microprocessor to extend battery life.

Figure 1. Schematic diagram of using the MAXQ3210 to power a 5V microprocessor
Figure 1. Schematic diagram of using the MAXQ3210 to power a 5V microprocessor

When the battery life and total system sink current requirements are severe during the design process, the MAXQ3210 can operate at a very low current state to save energy. The MAXQ3210 not only has a fully functional MAXQ® power management mode (frequency division, PMM1 mode, and STOP mode) to effectively save energy, but also includes an 8kHz oscillator that can be used as a very low-power clock source. At power-up, if there is no external crystal or high-frequency clock source, the MAXQ3210 will run on an 8kHz oscillator, reducing its operating current to microamps. Because the response time requirements are not strict, the MAXQ3210 can still implement the monitoring functions in this application note even when operating at 8kHz.

Reset and power monitoring The MAXQ3210 provides power-on reset (POR) and undervoltage detection functions, enabling it to exit the reset state when the power supply is stable. Under-voltage detection can make the microcontroller recover from the power drop. The MAXQ3210 can also provide similar POR and undervoltage detection for microprocessors without power monitoring.

Connect a port of MAXQ3210 to the external RESET pin of the microprocessor, so that MAXQ3210 resets the microprocessor when the power supply is lower than the threshold setting, and makes the microprocessor exit the reset state when the power supply returns to normal. If the microprocessor is working under 5V power supply, as long as MAXQ3210 is in POR or undervoltage state, MAXQ3210 will reset the microprocessor. If the microprocessor is operating at a lower power supply voltage (for example, 3.3V), the MAXQ3210 analog comparator can compare the power supply of the microprocessor to any voltage (up to 3.5V) at the VREF pin (about the analog comparator For more information, please refer to the MAXQ3210 data sheet). When the power supply of the microprocessor drops below the reference voltage, the comparator will generate an interrupt to the MAXQ3210 to reset the microprocessor and maintain the reset state until the power supply returns to normal.

Because all functions are implemented by software, the time interval for the microprocessor to recover from the power supply to exit the reset state can be set to any time period. If the system has multiple power supplies or needs to be powered up in a specific order, the MAXQ3210 can be used as a power-up timer to control the power-up process of the device in accordance with the specified delay time sequence of each action.

Add an external reset button to the system to initialize the reset sequence. Connect the reset button to a port of MAXQ3210 to make MAXQ3210 complete the software-based debounce function and generate a programmable width reset pulse in response to a key reset.

Adding a wake-up timer to a portable battery-powered system, saving power and battery life is the key to the design. In order to maintain low current consumption, such systems generally work in a low-power state as much as possible. The system wakes up periodically (or at the user's key press request), performs measurements or runs other tasks, and then returns to sleep. For non-working devices, it is best to turn off their power supply.

The MAXQ3210 provides a long-cycle wake-up timer to help save power. A wake-up timer that operates under an 8kHz ring oscillator can be set to make the MAXQ3210 enter a low-power state—stop mode, and automatically wake up after a preset time interval of up to 2 minutes. After exiting stop mode, the MAXQ3210 wakes up or powers up other devices in the system as required. The following MAXQ3210 program code demonstrates how to enter stop mode and then automatically wake up after 60 seconds.

mainLoop: ;; Perform applicaTIon tasks here ... ;; ;; Start the wakeup TImer for 60 seconds. move CKCN.6, # 1; Select ring oscillator mode waitRing: move C, CKCN.5 jump NC, waitRing; Wait for RGMD = 1 (running from ring) move WUT, # 30000; 1 / 8kHz * 30000 * 16 = 60 seconds move WUTC, # 0101b; Start the wakeup TImer (running from ring) move IV, #wakeUpInt; Set interrupt handler for wakeup interrupt move IMR.0, # 1; Enable interrupts from module 0 move IC.0, # 1; Globally enable interrupts move CKCN.4, # 1; Go into Stop mode, wait for wakeup int nop jump mainLoop; Back for another round ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;; wakeUpInt: move CKCN.6, # 1; Select ring oscillator mode wakeUp_ring: move C, CKCN.5 jump NC, wakeUp_ring; Wait for RGMD = 1 (running from ring) move WUTC, # 0; Clear wakeup TImer flag move CKCN.6, # 0; Select crystal mode wakeUp_xtal: move C, CKCN.5 jump C, wakeUp_xtal; Wait for RGMD = 0 (running from crystal) reti will MAXQ3210 Ports connected to the microprocessor, which can make inform power outage preparation. After the MAXQ3210 informs that the power is off, the microprocessor immediately enters a low-power stop mode or waits for the power to be shut down depending on the task being performed.

When the MAXQ3210 wakes up from stop mode, it can either power up the microprocessor (if the microprocessor is completely turned off), or use an external interrupt or similar mechanism to notify the microprocessor to wake it from a low-power state.

Adding a watchdog reset is the same as the MAXQ3210's wake-up timing. The microcontroller's built-in watchdog reset circuit can be extended to an external hardware watchdog reset circuit of the microprocessor. In the MAXQ3210, the watchdog serves as a safety device to prevent the program from running out of control during transient pulse interference. Once the watchdog timer is started, it must be reset by periodically setting a register bit. If the MAXQ3210 stops setting register bits and the timer overflows, the watchdog will automatically reset the MAXQ3210. This automatic reset restores the MAXQ3210 to a known starting state and restarts operation.

Only two connections are needed to extend the MAXQ3210 watchdog reset to the microprocessor: connect a port of the microcontroller to the external RESET of the microprocessor; return a port of the microprocessor to the MAXQ3210 port. The MAXQ3210 automatically enables the watchdog and resets the watchdog whenever it receives a signal from the microprocessor. The microprocessor is responsible for periodically triggering this pin to prevent the MAXQ3210 watchdog from timing out. The timeout period is programmable (for more information, please refer to the MAXQ3210 user guide supplementary material (English only).)

As an external watchdog for the microprocessor, the MAXQ3210 sets an interrupt when the watchdog times out. If the watchdog times out, it means that the microprocessor failed to trigger the port of the microcontroller in time, and the microcontroller needs to be reset. The MAXQ3210 responds to the watchdog interrupt, restarts the watchdog, resets the microprocessor through the external RESET pin, and restarts a cycle.

In the state of level and interface monitoring, when communicating between the MAXQ3210 and the microprocessor, the I / O levels of the two devices must be considered. If both devices are operating at 5V, the port pins can usually be directly connected, so be sure to refer to the device data sheet.

The MAXQ3210 output signal can also be directly connected to a low-voltage microprocessor (such as a 3.6V device). If the microprocessor pin contains a protection diode, the 5V output of the MAXQ3210 can be directly connected to the low voltage pin through a current limiting resistor. You can also choose to use an open-drain connection method: a pull-up resistor is drawn between the two pins to connect to the power supply of the low-voltage microprocessor, and the MAXQ3210 port is forced to pull down (PD = 1, PO = 0) or tri-state ( PD = 0, PO = 0) mode.

The input of the MAXQ3210 driven by the low-voltage microprocessor pin also needs to be operated carefully, because the low-voltage microprocessor cannot drive its port pin to a high enough level to set the MAXQ3210 register. If only one input is required (see Figure 1), the low-voltage signal can be connected to the MAXQ3210's analog comparator. Other possible methods include using an external pull-down FET with an open-drain configuration, or using a level shifter, such as the MAX3370.

For more discussion on this issue, please refer to Application Note 3007, Logic Level Translation.

Conclusion The MAXQ3210's small size, battery power, and stand-alone operating characteristics make it an ideal choice for programmable microprocessor monitoring. Several useful power-saving modes and power monitoring features can easily provide monitoring for the microprocessor, making the MAXQ3210 the core of extending battery operating time through software configuration, which is very suitable for portable battery-powered products.

Five Burner with Built in Hob

5 Burner Gas Hob,5 Burner Gas Cooker,5 Burner Hob,Glass Gas Hobs

xunda science&technology group co.ltd , https://www.gasstove.be