Part Number: MSP430AFE221
Other Parts Discussed in Thread: MSP-EXP430G2ET
Tool/software:
First thing: I don't know the Part Number! I've bought an MSP-EXP430G2ET, and am groping in the dark for how to get started.
My objective, as stated in my first question (in this forum), is:
"Build a prototype/proof of concept hardware & software device for an off-grid application. The uC must sense the battery voltage, and periodically drive a latching relay coil to apply or remove power to a sensor package."
I was told that the MSP-EXP430G2ET would be a good place to start, and that I probably didn't need a RTC for my application. This led to the purchase of the MSP-EXP430G2ET, and to this question:
There are - apparently - many, many examples that are available for my MSP-EXP430G2ET. However, I'm finding it difficult to locate one that proximates my objectives:
1. very low energy consumption; i.e. the device (MSP-EXP430G2ET) should be in "Low Power Mode" for most of the time
2. wake "periodically" to test the battery voltage:
2.a if the battery voltage is below threshold => go back to sleep for a time (an hour or two)
2.b if the battery voltage is above threshold => toggle a "GPIO" pin (this GPIO pin will 'set' a latching relay causing battery power to be applied to a sensor package)
2.c if the battery voltage is above threshold => set a 2nd "GPIO" pin (HI or LO) (this GPIO will serve as an "Input Flag" to the sensor package that it may continue to run if needed)
3. Optional: serve as an I2C/SPI "slave" to the sensor package.
Could someone point me to a "sample code" example in 'C' that illustrates how the functions above may be coded? Thanks!
~S

this two demo maybe a good start.
for the i2c will have more demo code that you need to review it by yourself.