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 chip on breadboard (connected rst)

Other Parts Discussed in Thread: ENERGIA, MSP430G2553

Hello, i searched a lot for this, i just want to test the blink with the msp430 chip removed and placed to the breadboard.

I connected RST to Vcc with total 54k resistor as in the picture.

Blink pin is 14 (green led on launchpad) so i connected the led to there.

Thanks in advance.

  • Hi Kerim,
    Not sure what exactly is your question. But if you want to use just a LED with your MSP430, please check also the table “Connection of Unused Pins” in your Users Guide. For example the recommendation of the RST pin is for a 6xx device is: 47-kΩ pullup or internal pullup selected with 10-nF (2.2 nF) pulldown.

    Best regards,
    Tobias
  • You don’t tell what MCU you are using or what question/problem you have.

    But realize that this breadboard is quite capacitive. Floating (or high resistance) input pins will receive pulses from neighbor pins.

    Connect unused pins to Vcc or Vss, especially RST and TEST.

  • Hi, thanks for your answers.
    The problem is that, its not working.
    I connected RST(pin num. 16) to Vcc with 54k ohm (dont have 47 k ohm right now).
    The chip works fine while its in the launcpad but when i remove it, it doesnt work, even thought i connect reset to vcc.
    Thanks again.
  • But I don’t see a capacitor on the breadboard as meant by Tobias.

    You need to generate a Restart pulse, you can also do this by connecting the RST pin for a moment to Vss (Low).

  • Thanks again.
    I tried with the capacitor just now. Still nothing.
    I am using 2x1,5 V AA batteries and MSP-EXP430G2 launchpad by the way.
  • Is the short LED-lead connected to the gnd?

    Direct drive of LED from MCU, you should use 1K resistor as pin drive is not that strong.
    So LED need to be ultrabrite type as to get normal brightness when only feeding it 3mA.

    crossplatform.net/running-msp430-launchpad-on-a-breadboard

  • Yes, Led is connected right and i tried it even without a resistor behind the led and with an another led.
    There is no problem while i connect the launchpad with USB,
    green led blinks and with wire connections to the breadboard that led also blinks too.
    But when i remove the chip, i doesnt blink. Just dont get it.
  • Hi,
    you said that you connected LED to pin 14 (P2.5), but on launchpad green LED is connected to P1.0. Maybe you can share your code with us.

    Best regards,
    --
    Klemen
  • Sorry, my mistake. According to documentation LED1 (green) is P1.0 and LED2 (red) is on P1.6.
  • Hi,
    I misspelled, sorry for that.
    I mentioned it in the code as pin 14 anyway.
    It is just the blink code as you can see;
    /*
    Blink
    The basic Energia example.
    Turns on an LED on for one second, then off for one second, repeatedly.
    Change the LED define to blink other LEDs.

    Hardware Required:
    * LaunchPad with an LED

    This example code is in the public domain.
    */

    // most launchpads have a red LED
    const int LED = 14;

    //see pins_energia.h for more LED definitions
    //#define LED GREEN_LED

    // the setup routine runs once when you press reset:
    void setup() {
    // initialize the digital pin as an output.
    pinMode(LED, OUTPUT);
    }

    // the loop routine runs over and over again forever:
    void loop() {
    digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level)
    delay(1000); // wait for a second
    digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW
    delay(1000); // wait for a second
    }

    Thanks for your answer,
    Best Regards.
  • Except for the missing RST capacitor your breadboard setup looks ok, only difficult to see where the LED resistor wire goes, hopefully pin 14.

    It looks like you use a 220R series resistor for the LED, this is too small, it should be minimal 333R so better use 470R otherwise you can damage your MCU. Try without a MCU installed to connect this resistor to GND, the LED should go on.

    Be aware that some schematics can label the LED colors wrong, Red = Green and Green = Red. Try also the output on pin 2 (P1.0). I have no experience with Energia so I can’t verify your software.

    BTW: What size of RST capacitor do you use?

  • As someone earlier mentioned, your code is expecting that you generate restart condition (in your case you need to shortly connect RST pin to GND to simulate reset button).
    Do launchpad needs to push reset button before starting blink example? Have you tried it when you disconnect all jumpers on J3?
  • Sorry, another mistake. I was thinking about disconnecting RST jumper on J3 or at least don't disconnect VCC jumper because MCU can't work without supply.
  • I used 100 nf but as i researched, there are people who have done it without capacitor.
    I was using 9V battery to test it when i first bought it. I now know it is too much.
    Could something may be damaged? It works on launchpad so i cant understand that.
    Thanks for all your replies.
    Best regards.
  • If it still works on launchpad then it's OK. What is your voltage source on a breadboard?
  • I am using 2 x 1,5V AA batteries. As i looked for it, between 2,8 and 3,6 should be ok, right?
    Tried with pin 2 for LED just now. Still nothing :/
  • Do you have multimeter/voltmeter? If you have it, please measure voltage when connected to breadboard. MCU MSP430G2553 which you are probaly using needs at least 3.3 V to operate at 16MHz which is default core frequency set in energia. You can lover the frequency in file:
    - go to energia's folder
    - go to: hardware/msp430/variants/launchpad
    - open file Board.mk

    It looks like this:
    ######################################
    # Board specific
    ARCH = msp430
    MCU = msp430g2553
    MCU_FLAG = -mmcu=$(MCU)
    F_CPU = 16000000L
    FLASH_SIZE = 16384
    UPLOAD_COMMAND = $(MSPDEBUG) $(VERBOSE_UPLOAD) tilib --force-reset "prog build/$(SKETCH_NAME).bin"
    ######################################

    now change line with F_CPU:
    F_CPU = 8000000L

    Save file and rebuild your project and upload it to MCU.
    With 8MHz MCU needs only 2.2V and two batteries should be sufficient for those requirements.
  • Kerim Moral said:
    I used 100 nf but as i researched, there are people who have done it without capacitor.
    I was using 9V battery to test it when i first bought it. I now know it is too much.
    Could something may be damaged? It works on launchpad so i cant understand that.

    100nF is Ok. The MCU needs a Reset, it’s not possible to generate a Reset without capacitor but as already said the Breadboard himself is quite capacitive, under circumstances this can be enough.

    The MSP might have survived the 9V but it can be partly defective and draws too much current from the batteries now. The LaunchPad comes with two devices, tries carefully the second one.

    Another component missing on your breadboard is a decoupling capacitor of 100nF directly connected to the MCU pins Vcc and Vss, expressly when you are using a clock frequency of above 1MHz.

  • @ Klemen Bregar
    Unfortunetly i dont have a measuring device.
    Tried the things you said, still nothing :/

    @ Leo Bosch
    I took the launchpad from a familiar person, so i dont have the second device :/
    Sorry for the noobish question, but what is Vss? Ground?

    I guess it is partly defective then :/ I hope it doesnt stop working on the launchpad in soon too :/
    Thanks again for all your helps.
    Best Regards
  • In this case Vss = GND (sometimes Vss can be a minus voltage).
    Tries to supply your breadboard from the LaunchPad 3.3V.
  • Works with the LaunchPad 3.3V.
    So, for some reason, i need exact 3.3V, right?
  • For 16MHz you defenitely need 3.3V...maybe my suggestion for lowering frequency wasn't correct...I can't try it now...
    Look at this post and try to change MCU frequency to 1MHz forum.43oh.com/.../2970-energia-ez430-f213-and-setting-f-cpu

    Instead of
    #if 0
    BCSCTL1 = 0x8E; // 14.76MHz
    DCOCTL = 0xE0; // 14.76MHz
    BCSCTL1 = 0x8F; // 15.92MHz
    DCOCTL = 0x90; // 15.92MHz
    BCSCTL1 = 0x8F; // 15.95MHz
    DCOCTL = 0x91; // 15.95MHz
    BCSCTL1 = 0x8F; // 16.03MHz
    DCOCTL = 0x93; // 16.03MHz

    P1DIR |= BIT4; // output dco clock on P1.4
    P1SEL |= BIT4; // measure with scope or frequency counter
    #endif
    DCOCTL = 0; // avoid glitches
    BCSCTL1 = 0x8F; // 15.99MHz
    DCOCTL = 0x92; // 15.99MHz

    just write:
    BCSCTL1 = CALBC1_1MHZ;
    DCOCTL = CALDCO_1MHZ;

    This maybe will help to run MCU from batteries...but for full functionality of energia code environment, you will definitely need 3.3V regulated voltage source. For now you can use 3.3V from launchpad

    P.S.
    Change F_CPU back to 16000000L to prevent problems with other examples
  • And buy one of those:
    www.ebay.com/.../361074791137;hash=item5411bc12e1
    they can get really usefull sometimes. If you are planning to do more with electronics, buy better one.
  • Good to hear you have reached the first step to get it working on your breadboard.

    There can be several reasons. When using small batteries, AA or AAA they might not be able to supply the necessary current. 16MHz needs a lot of current but 3V must be Ok. If you remove all clock setup lines and leave it default it will run at 1MHz and must work with two batteries.

    You can add a second LED, with a resistor of 470R in series, directly connected to Vcc and GND of the MCU and so checking if you have power on your board.
  • Unfortunetly, with 1 Mhz it is working slowly on the launchpad but still nothing on the board.
    Second LED gives light btw.

    And noticed that when i took 3,3 V from the pad, it began to work after i played with pin20-gnd wire a little while.
    I had to do that every time.
  • Run it 1 MHz so we can take  low voltage problem out of the equation.

    0.1uF cap between Vcc and gnd, as close as possible to MSP's pin1

    47K resistor between Vcc and Reset (5th pin from the top)
    a 0.1uF-to-0.01uF cap between Reset and Gnd (1nF if you plan to do in circuit reprogramming)

    A 100 Ohm resistor between Reset and Gnd that you push in and then out when you do a reset. (or a real switch)

    Make sure Energia code does not use 32K crystal as you don't have one on breadboard.

    Is the programming done in debug mode? if so exit debugging and click reset on the Launchpad before you move over the chip.
    Though I can not see it surviving debug mode with no power for at least 1second.

  • Kerim Moral said:
    Unfortunetly, with 1 Mhz it is working slowly on the launchpad but still nothing on the board.

    Try to shorten the time intervals in the software.

    Adjust the series resistance to this LED so that it just glows and it will give you an indication about battery voltage change. Make a jumper (wire) connection to MCU Vcc and watch the LED when closing/opening this jumper (with and without power to the MCU).

    Kerim Moral said:
    And noticed that when i took 3,3 V from the pad, it began to work after i played with pin20-gnd wire a little while.

    The quality of this breadboard is not high. You need to use proper sized wires. And avoid bending of the wires (also from components) as seen on your picture, keep them straight.

    You also can add a jumper wire from RST to GND and close it for a second to do a manual Reset, watch also in this case your power LED.

**Attention** This is a public forum