Jump to content


  • Content Count

  • Joined

  • Last visited

About TomMFluk

  • Rank
    Noob Class

Profile Information

  • Gender
  • Location
    Geneva, Switzerland
  1. TomMFluk

    Button use

    I got it working ! There was a missing line in the code (after line # 19) : P1REN |= 0b00001000; I also modified the test as follows (line # 27) : if (P1IN & 0b00001000) Anyway, I need more knowledge about PxREN and other registers
  2. TomMFluk

    Button use

    Sorry timotet, but finally your code WORKS ! Another device connected to my launchpad prevented it to work correctly As my code still doesn't work, I have to analyze yours to understand what is wrong in mine.
  3. TomMFluk

    Button use

    Thank you timotet for your reply. However, your code, though compiling correctly, doesn't work either. Both red and green LEDs are on and nothing changes with the button. Actually, in either your code or mine, the test is not working. The button push is never detected. This gives me a headache !!! Is the port really 1.3 for the button ?
  4. TomMFluk

    Button use

    Hi everybody, I'm new here and beginner in programming both C and MSP430. I'm trying to understand how to use the button on the TI MSP430 launchpad. The goal is only to light on the green LED when I press the button. The button on the board is labelled P1.3. Therefore I suppose it's connected on the bit 3 of port 1. I wrote the following code in Energia, but the green LEDs is off, and nothing happens when I push the button. #define RedOn P1OUT |= 0b00000001 #define GreenOn P1OUT |= 0b01000000 #define RedOff P1OUT &= 0b11111110 #define GreenOff P1OUT &= 0b10111111
  • Create New...