Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Thanks for the tip Rei Vilo. I knew the pullup was necessary for push buttons, but didn't consider using it for a normal digitalRead (makes sense now, though). @@roadrunner84 I agree, but one thing at a time. I'm trying to get it running reliably before I start with the fancy stuff. I've been bitten by premature optimization too many times in the past UPDATE: I changed 'moistPin' mode to INPUT_PULLUP and that seemed to fix it since it triggered the relay after an hour. However, the relay was not triggered ever again after that. I hit the reset button this morning and expected it to t
  2. Hey all, I'm having some trouble with a project that checks a pin every hour and should trip a relay if a certain pin is HIGH. Some notes: - this is with the MSP430G2553 chip - it seems to run fine if duration is low (ex: 5000ms) - it worked at least once (triggered buzzer after an hour) when I replaced the relay circuit with a simple buzzer I'm using this relay circuit: And this code using TwoMsTimer library: #include <TwoMsTimer.h> unsigned long duration = 3600000; int relayPin = 14; int moistPin = 15; int state = 0; void setup() { pinMode(
  3. Bingo! That was it. I had to remove all of the jumpers from J3. Now it's idling around 25uA like it should be. I guess I missed this info in the 'MSP-EXP430G2 LaunchPad Experimenter Board User's Guide'. The jumpers and dotted line between EMULATION and MSP-EXP430G2 make sense, now.
  4. Thanks for the quick replies! For some reason, my "__bis_SR_register(LPM3_bits);" line didn't get pasted into the original code, but it was in the program when I got the 40mA number. It may have dropped a couple of milliamps, but it seems like something still isn't right. This is what my main function looks like now: void main ( void ) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer setTime(0x10,0x59,0x50,0); // initialize time TACCR0 = 32768-1; TACTL = TASSEL_1+MC_1; // ACLK, upmode TACCTL0 |= CCIE; // enab
  5. Hi all, I'm working on a very simple project that uses the RTC library to set an alarm. I'd like the board to last at least 1 year on a single charge from a 1500mAh li-ion battery and I don't think the MSP430G2553 I'm using should have any problem meeting this requirement. However, the battery is depleting within a couple of days and my multimeter is showing ~40mA being drawn by the board. Since I don't need the time to be super accurate, I'm using VLO as my clock source to save on power (at least I think I am). Since I'm just mocking this up, there is no buzzer yet. I'm just using the onb
  • Create New...