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.
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.
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)
}
}
>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
**Attention** This is a public forum