Basic microcontroller questions

Discussion in 'Embedded Systems and Microcontrollers' started by kgstewar, Jan 15, 2014.

  1. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    I'm about to delve into the world of microcontrollers and had a few questions about Arduino and MSP430. Any help is greatly appreciated!

    1. I bought the MSP-EXP430G2 launchpad. Am I correct that typically with this Launchpad you pop in a microcontroller chip, program it, test it, and once it works how you want, you take the chip out, incorporate it into a circuit, and now your Launchpad is free for the next project?

    2. The MSP-EXP430F5529LP Launchpad has a more powerful chip (more I/O, etc.) but because this chip is a SMD you don't remove it after you get it doing what you want. Instead, the whole Launchpad now becomes part of your circuit. Is that correct? If so, seems wasteful!

    3. Lots of Arduinos out there but for example, is the Arduino UNO R3 like the MSP-EXP430G2 Launchpad and the Arduino UNO R3 SMD is like the other Launchpad? And I know they are different chips, etc., but I mean in one case you typically use only the programmed microcontroller in your project, and in the other case you use the whole Arduino board.

    Am I close? Thanks!

    Kevin
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    The Arduino mentality is to abstract the inner workings of the microcontroller so as to be easy for the user - implemented through various software and hardware. To do this, the Arduino has a bootloader that handles the programming of the device from a UART interface. It is this bootloader that makes the Arduino hardware an Arduino, as without it, it is just a bare AVR on a development board. In short, you cannot just replacethe AVR in the Arduino with another AVR unless it has the Arduino bootloader, though you can take the Arduino AVR and transplant it into another circuit.

    The Texas Instruments Launchpads you mentioned have a chip on board to handle the programming of the target device. This means it can program bare microcontrollers which may be replaced after programming.
     
  3. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    Thanks, that's helpful, so with Arduino, typically the whole shebang goes into your project.

    With the MSP-EXP430F5529LP do you know if there is a way to program an external chip? I guess there must be otherwise every project would have to include the whole Launchpad.

    thanks!

    Kevin
     
    Last edited: Jan 15, 2014
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    That's generally how they're used...

    Yes, it's just a matter of following the correct protocol. There's probably an external programmer out there (I typically use PIC microcontrollers).
     
    kgstewar likes this.
  5. ActivePower

    Member

    Mar 15, 2012
    155
    23
    A quick search for Google with 'MSP430 ISP' or 'MSP430 JTAG' would get you something decent. There's one flashing tool available from TI too.
     
    kgstewar likes this.
  6. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,362
    No, you have the wrong idea. The MSP430 LaunchPad is an evaluation module.

    The primary purpose of the LaunchPad is for a potential developer to learn how to use the mcu and all its capabilities and how to develop software for it.

    1) An experimenter/hobbyist may choose to use the entire module in a stand-alone project.

    2) You may choose to cut the board along the score line and only use the portion of the board containing the target mcu. I would not do that.

    3) You may choose to remove the socketed mcu as in your option #1. But I would not do that either.

    4) You can remove the row of jumpers located at the score line and connect your own cable and use the module as an in-system programmer (ISP). This is what I do.

    Only two signals are required plus Vcc and GND in order to program your target mcu.

    There you have it. The MSP430 LaunchPad is its own ISP. There is no need to buy a programmer.

    See this:
    http://forum.allaboutcircuits.com/blog.php?b=554
     
  7. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    Thanks Mr. Chips, very helpful.

    So let's say I wanted to make a simple project like a countdown timer. I assume I could make a circuit using an MSP430G2553 which is programmable via the basic launchpad. If I understand correctly, you would test this all out using a chip that was on the launchpad, but when you wanted to actually build the circuit, you would not just yank out the programmed chip (your # 3), but instead would program an externally connected chip (your # 4)? Am I understanding this correctly? If so, why not use #3? Too much wear and tear on the launchpad socket?

    Thanks again! Very clear blog post and I see how your option 4 works.

    Kevin

    EDIT: Ok, now I've thought about your option 4 for a few minutes. I can see that would be better because it's a lot easier to build a circuit on a breadboard with the MCU on the breadboard, as opposed to having part of the circuit on the breadboard and then a dozen - or more - jumper wires running to the launchpad.
     
    Last edited: Jan 15, 2014
  8. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,362
    1) Too much wear and tear.

    2) You can never be satisfied that the program is complete. You are bound to program it a few dozen more times after you think you're done. You want the mcu chip sitting in-circuit in its final resting place, thru-hole or SMD. You use your ISP capability and get the job done.
     
  9. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    Thanks Mr. Chips, that make sense.

    Have you ever used the MSP-EXP430F5529LP Launchpad? If so, I can you still use your option 4? Although I'm not sure how one breadboards an SMD mcu, it must be possible.

    Kevin
     
  10. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,362
    For an SMD chip such as MSP430F5529LP, use the LaunchPad to do as much testing as possible to select which I/O pins you want to use. Then go lay out a PCB.
     
    kgstewar likes this.
  11. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    Thanks for your reply. Do you know if it possible to use the MSP430F5529LP as an ISP the same way that you have described using the other Launchpad (your option #4 above)? I'm guessing yes, although I can see a potential issue in that the MSP430F5529LP always has a MCU chip on it so programming an external chip may cause issues?
     
  12. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,362
    When you remove the jumpers I described before, you disconnect the onboard mcu from the programming signals.
     
  13. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    Great thanks. It sounds like the various TI Launchpads have enough versatility and room for growth that I can go ahead and commit to the MSP430 platform for now. Many thanks.

    Kevin
     
    Last edited: Jan 16, 2014
  14. kgstewar

    Thread Starter Member

    Apr 5, 2012
    151
    6
    Actually, one more question. I know the basic launchpad can program a 20-pin DIP msp430g2553 either on board or as an ISP using the technique outlined by Mr. Chips in his blog post. The msp430g2553 also comes in surface-mount packages with more I/O pins. Am I correct that the basic launchpad can also program these chips as an ISP so long as the chip is breadboarded or mounted on a PCB?

    Thanks,

    Kevin
     
  15. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,362
    It does not matter where or how the chip is mounted,
    so long as you provide the connections required for ISP, Vcc and GND.

    Don't forget proper decoupling capacitors across Vcc and GND.
     
    kgstewar likes this.
Loading...