MIPS and MCU On-Off

MIPS and MCU on/off

This sketch uses the Energy Saving library for MIPS and MCU power management. 
In particular in this example is shown how the MIPS and the MCU can be managed via an external interrupt.


- Arduino Tian 
- One switch button or a jumper


Arduino Tian 

Use a switch button or a simple jumper and connect it to pin 8 of the board. 
Plug the board to the computer and upload the code. 
The board must be powered with one power supply that provides output at least 2A. 
You may need to use a Y-Cable (USB Micro-B to Standard Male A).


This sketch allows the users to manage the Tian and MCU power management.
Users can power up or power down MIPS and MCU with an external interrupt.
#include <EnergySaving.h>
EnergySaving nrgSave;
#define MIPS_PIN 32 //PA28 PIN 32
void setup()
nrgSave.begin(WAKE_EXT_INTERRUPT, 8, wakeUp); //standby setup for external interrupts
void loop()
doSomething();// call the "doSomething" function
sleep();// call the "sleep" function
void doSomething(){
//blink for 90 seconds
for(int i=0; i<90; i++)
void sleep(void){
// MCU and MIPS go in standy mode
digitalWrite(MIPS_PIN, LOW);
nrgSave.standby(); //now mcu goes in standby mode
/*wake up*/
void wakeUp(void) //interrupt routine (isn't necessary to execute any tasks in this routine
//mcu is waked-up by the interrupt
//wake up mips


After that you have uploaded the sketch, the Led 13 will blink for 90 seconds. 
Arduino IDE 

After 90 seconds the MIPS and the MCU will go OFF. 

LNX ON Les goes OFF 

If you want wake up the MCU, then connect a jumper or a switch button between the 8 pin and GND, as shown in the below image. 

Connect a jumper between pin 8 and GND 
LNX ON Led goes On