Jump to content
43oh

MSP430G2553 low power or send to sleep


Recommended Posts

Hi to all,

I am new with low power modes and therefor I want to use this forum for an initial project. It will be a kids toy. Just a MSP430G2553, two AA-batteries, one LED and a pushbutton. If you press the pushbutton than the LED will light up. If you press the pushbutton again than the LED will switch off. If the LED is on for a about 1 minute than the LED will be turned off. Another push on the button will turn on the LED etc.

The code for the task above is not a bis problem. But I want the controller to send in sleep mode while waiting for another push of the button. And I have no clue... :)

Thank you for your help!

Ade, STEFAN.

Link to post
Share on other sites

I'd suggest downloading the code examples from the product page - http://www.ti.com/product/MSP430G2553/toolssoftware (download link - http://www.ti.com/lit/zip/slac485)

There are a lot of examples depending on what particular aspect you're looking for.  Here are a couple of examples that might be helpful:

  • msp430g2xx3_P1_04.c - toggle LED when button pushed - using LPM4
  • msp430g2xx3_lpm3_vlo.c - LPM3 - LED toggled every 6 seconds
Link to post
Share on other sites

I made this exact setup a few years back. I actually used two buttons and two LEDs, and I embedded it in a toy kitchen. If I remember correctly, I used an msp430g2230 for the task, that's an 8 pin msp430.

I did not use Energia for this project, but IAR, similar to CCS. There were some extra features, for example the LEDs were pulsed, and the pulses of the LEDs were 180 out of phase as to load the battery as evenly as possible.

I used both LPM3 and LPM4 for this task; while an LED was on, I went to LPM3 to allow a timer to keep running. Then when the timer expired (and thus the LEDs are turned off) I go to LPM4 which should use about 200nA on that processor. I don't know if it is really that low, I don't own a nanoamp meter.

Link to post
Share on other sites

I have to use Energia to code. :)

Well, I know there's a way to go into low power in Energia - might be a good idea to post in the Energia forum. Attach Interrupt would take care of the button push part and Sleep looks like it would work for low power/timing portion - but I don't use Energia a lot outside of ARM chips.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...