This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430 Stand Alone without any external circuitry and timers?

Other Parts Discussed in Thread: MSP430G2553

It's been about 4 years since I've touched my MSP430's but I now have a perfect application for them.  They are being used in a 'light' gun, where if a button is pressed, I set a pin high for 50 ms, then low and sleep for 50 ms, then resume in the loop (so you can only shoot a limited amount of times / second).  I have 2 Launchpads, so could I just program them on those, and just wire the buttons to IO pins and do digital reads without any issues? I ask because the Arduino says to use a crystal if in stand alone.

Thanks.

  • Most LaunchPads include 1 or 2 push-buttons and 1 or 2 LEDs, so you certainly can do that "without any external circuitry". But you do need to plug it to a USB port to get power or provide the board with power with other arrangement.

    Without a crystal, your 50 ms "light" and "sleep" periods will only be about +/- 1 ms accurate.

    If you can only use Arduino, or any specific software development tool, you are also subject to the limitations of that tool in addition to the hardware limitations of the LaunchPad.
  • Okay, so the crystal is just for perfect timing (which isn't necessary to me)?  I've been in the software field the past few years and I've been aching to do another hardware project and I'm having to remember even the basics.  It's going to be EXTREMELY simple code making my MSP430s perfect for it (since I don't have a PIC programmer)

    My code will essentially be:

    loop(){

    if (triggerPin == HIGH){

    LEDpin = HIGH;

    sleep(50);

    LEDpin = LOW;

    sleep(50);

    }

    // Makes sure they must let go of the trigger to not just hold it down

    while (triggerPin = High){

    sleep(50)

    }

    }

  • Most MCUs have internal oscillators so that the CPU can run before the crystal has been initialized. This is true for both AVRs and MSP430s.

    If the built-in oscillator's accuracy is enough for you, you don't need a crystal.

    The absolute minimum to get a MSP430 to run is just a power supply (and its decoupling capacitor(s)).
  • For something that simple involving a mcu may not be needed.
    Ask someone in a electronics forum how to wire up a 555 timer ic for 50ms "cool off" laser gun pause.

    Or a programmable delay supervisor could possible be used.
    www.ti.com/.../supervisor-reset-ic-overview.page
  • Why capacitorS? Would one 100nF capacitor between Vcc and Gnd not suffice? Any recommendations?
  • You did not mention the model you're using; some MSPs would need more than one.
  • Sorry, my launchpad box says MSP430G2. Is that enough to identify it?
  • That's the MSP430G2553. Anyway, any such additional requirements would be listed in the device-specific datasheet.
  • >Why capacitorS? Would one 100nF capacitor between Vcc and Gnd not suffice? Any recommendations?
    100nF would be decoupling cap in case of stable supply. Sometimes electrolytic storage cap ~4.7uF .. 10uF for sleepy applications like yours, needed too. Any chance to show (planned) circuit, provide battery and "laser" specs?

    BTW you need one another capacitor and resistor - for reset pin.

  • Please forgive my touchpad paint drawing, but it is this simple.

    The button is pressed by a trigger and then will drive the laser.  The laser I ordered is this: https://www.sparkfun.com/products/9906

  • You need electrolytic caoacitor definitely for handheld device powered from 2xAA

**Attention** This is a public forum