IOT: Lowering your software design’s power consumption (part 2)
Like security, quality, process, design power consumption for software designers is usually the last thing you worry about. Security for all design is first priority, just today 10/3/2014, another major hack was reported, just shy of 100 million “households” were somehow put in danger of being hacked.. So, I guess I should have done security first, but I didn’t, but it’s on the chip.
In the previous blog you saw how the MSP430FR5969 blinky software was not running at as low power as possible.
Let’s review the C-code… Ugh, C-Code, but the c language is lightweight, runs at the “brass” level. It isn’t object oriented and other minor issues. https://energia.nu/pin-maps/guide_msp430fr5969launchpad/ , which as of 10/05/2014 showed the following, will update when it changes but for now, there are no pin-outs. To see what you should expect, see the link: https://energia.nu/pin-maps/guide_msp430f5529launchpad/, that link shows you what the MSP430FR5969 board will look like when it is posted. There are differences between the two boards, the most important is that the MSP430FR5969 has a supercap on the pored, which is a big deal, since you can now experiment with using no Battery with your device.
However, c is pretty forgiving, so I tried some usual tricks for getting emulators working, something that is often part of the job component. Code Composer installed nicely on my machine. I get my Windows 8 protection through System Center Endpoint Protection . One of the problems with Code Composer is that I need to determine how to untenable the constant update, and other procedures.
Here is the Code solution I came up with:
I did so by reviewing other code links, as advised in the “Advice” Tab, with a couple of runs, my active tab was blank and note that the length of time a CR2032 will likely last is 5.9 days, an improvement of 2 days. Just think of the fun times people using your Pumpkinduino for Halloween with have.
Scroll down to see the length of time a CR2032 can last using this new blink software. So c-code is like the Arduino coding language named Wiring, but with more control at the hardware level. “c” code is easy to use, and to build stuff, but because it isn’t object-oriented, maintenance can be a little messy with the linking lists. But it has a small footprint and it, runs on very basic systems.
You might be asking why did you have to initialize the pins? It’s the physics of the thing, which is one way of saying if you want to know, then you must review Maxwell Equations. Ha-ha just kidding, it is that the internal construction of the MSP430 will an internally switch output transistors to ground which will ensure that there is no “noise” at the related pins, this also ensures that output transistors are put into an off-state that is low or zero energy use.
I reviewed the code and the coding suggestions given to improve the power consumption. With some experimentation I determined that
The code and Advice shown below, note that it is very interesting since it is blank.