3.1 Application Overview

To implement the emulated system power supply and its control, a simple application is developed using two PIC16F15244 Curiosity Nano Evaluation Kits. The process computer sends out a command to the supply control module over an I2C bus to shut down the system power. This sleep command contains the duration for which the system is to be put in Low Power mode. For simplicity, the on-board switch on the process computer (i.e., the PIC16F15244 Curiosity Nano kit emulating the process computer) is used to trigger the power-down command.

After receiving the sleep commands, the supply control module waits for 30 seconds before turning OFF the regulator. This period provides sufficient time for the process computer to perform the shutdown housekeeping tasks that are required for Linux® OS-like operating systems (such as invoking the shutdown procedure). The supply control module device disables the emulated voltage regulator, then enters Sleep mode. The supply control module will automatically turn ON the voltage regulator after the power-down period expires or an external trigger is provided.

Figure 3-1 demonstrates the operation of the process computer and supply control module.

Figure 3-1. Application State Diagram for Process Computer and Supply Control Module Firmware

Power-Down Command: The power-down command triggers the shutdown of the regulator by the supply control module’s microcontroller. The command also contains the time duration the system will be turned OFF. The command consists of an ASCII string for cross platform support: S (number of seconds), where the first byte is the character ‘S’ and the following six characters are the shutdown duration in seconds (for example, ‘S007200’ represents 7200 seconds, or two hours, of system power-down).

Manual Wake-Up Interrupt: In case the process computer needs to be turned ON before the power-down period is over, the supply control module can also accept user input. To demonstrate this feature, an on-board switch is used on the Curiosity Nano board serving as the supply controller is used. The supply control will immediately turn ON the regulator in the event of a switch press.