
cps13
Members-
Content Count
6 -
Joined
-
Last visited
-
Days Won
1
cps13 last won the day on February 3 2015
cps13 had the most liked content!
About cps13
-
Rank
Noob Class
Profile Information
-
Location
Southampton, UK
-
Hi, I have posted about this before but I am still struggling I want my code to: Be in LPM until it detects an input on P1.3 When an input on P1.3 and P1.5 are present execute code which turns on P1.5 for a count of i go back into LPM What I don't understand is what the interrupt is actually DOING. By this I mean I know the code below is the interrupt routine on Port 1 but is this waking the 430 up? Should my code I want to execute whilst the 430 is awake go in here or somewhere else? // Port 1 interrupt service routine #pragma vector=PORT1_VECTOR
-
Where can I find this answer? Thanks for your other comments.
-
I have been banging my head against the desk for 3 days trying to figure out interrupts on the MSP430... but no joy. What I want to do is: When a input is detected on PIN1.5 activate output on PIN1.2 for a specified time. Then Enter LPM2. Next time an input is detected on PIN1.5, wake up, activate PIN1.2 for the specified time, then re-enter LPM2. Do this forever. The code below i have left 1.3 (switch 2 on the launch pad) as the interrupt just while testing. However I cannot get it to work... Can anyone tell me what i'm doing wrong? Thanks #include "msp430g2211.h
-
Hi, I currently have a program which detects the level of one input pin, if this pin is high it activates an output pin, which in turn drives a relay. The scenario I have is a pulse input whilst the input device into the 430 is active (i.e. every 2 seconds my device sends a pulse to the input pin on my 430). At present my program detects the input and turns the output on for a specified count. The problem I am having is that when the count is over the output turns off, if this lands in between a pulse from my input device it periodically switches off when I don't want it to.
-
Changed a couple of bits on my program. But as dubnet says setting P1.0 to low I think did the trick Thanks!! #include <msp430.h> /* * main.c */ volatile long int i; int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer P1SEL = 0x00; // setting all P1 pins to GPIO P1DIR |= 0x01; // Set P1.0 to output direction P1IN =0x00; // Set P1.0 to LOW P1OUT =0x00; // Set P1.4 to LOW for (; // infinite loop { if ((0x10 & P1IN)) // check if P1.4 is high
-
Hi, I am new to the MSP430 and after a bit of advice please. I have an MSP430G2553 DPIP which is accepting an input of 2.5V (via a potential divider, input starts at 18V), when the input is detected the output switches on for a count and then goes off again. The problem I am having is that about 50% of the time when I power the circuit on (2 x AA batteries) the output immediately comes on, when there is no activate input. I have a 1K resistor to +V from the RST pin. I have a 1K resistor to GND from on my output pin I have a 100K resistor to GND from my input pin The outpu