Jump to content
43oh

mondo8205

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. My Vcc is 5V and my Rx is connected to the P1.1. This should still work, right? What about the hello world code for this, does anyone have a sample?
  2. Ok I have looked all over and can not find an example code for the following SparkFun LCD Display. I have a MP430g2452 and the following LCD Display: https://www.sparkfun.com/products/9394 It just has Vcc Gnd and Rx. I just need a very simple "Hello World" code. Can anyone point me in the right direction. Thank you!
  3. Im trying to make the button work as an interrupt but pin 1.3 is 0V so the only way to accomplish the interrupt is to jumper 3.3V to that pin. I'm using an edge interrupt and the button takes pin 1.3 to ground but if pin 1.3 is already low it does nothing. How do I get pin 1.3 to be high and look for the low edge??? Here is some code I have written already, BUTTON is BIT3. WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P2DIR |= (BIT0 + BIT1 + BIT2 + BIT3);//Set Port2.0.1.2.3 direction to output P2OUT &= ~(BIT0 + BIT1 + BIT2 + BIT3);//Set Port2.0.1.2.3 to all zero P1DIR |=
  4. I'm trying to run this general code to blink the led and be able to turn it off and on with the following code. #include "msp430g2452.h" #define LED_0 BIT0 #define LED_1 BIT6 #define LED_OUT P1OUT #define LED_DIR P1DIR #define BUTTON BIT3 unsigned int blink = 0; void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer LED_DIR |= (LED_0 + LED_1); // Set P1.0 and P1.6 to output direction LED_OUT &= ~(LED_0 + LED_1); // Set the LEDs off P1IE |= BUTTON; __enable_interrupt(); for (; { if(blink > 0) { P1OUT ^= (LED_0 + LED_1); // Toggle P1.0 and P1.6 using exclusive-OR __d
×
×
  • Create New...