Thursday, July 8, 2010

Schematic Images and Explanation

For those of you who do not have Eagle Cad or would just simple like someone to walk them through the schematics for the LaunchPad (LP from now on), I have attached images of the schematic and will be explaining some parts.

Sheet 1 shows the microcomputer which is part of the emulation side of the programmer. Jump to the next paragraph if you know your circuitry already. Please note, this is NOT the microcomputer we will be programming, the MSP430F16x is used to program our microcomputer through the SBW interface. On the left side, we can see a status LED which is just hooked up to VCC (the upper voltage rail) with a resister. Funny that they label the trace EZ_VCC... Anyway, ever wonder why you see capacitors connecting VCC to ground in most schematics? Its to eliminate power spikes or dips from the DC lines in order to provide stable power. Capacitors appear as an open circuit to DC current, thus one can somewhat easily visualize that any AC (spikes or dips) will be filtered out and be sent right to ground. As is true with ALL electrical components nothing is perfect, but these capacitors do help.

The important things to note in Sheet 1 are J3 and J4, the two connectors on the right side. J3 is the connector which connects the Target side of the programmer to the Emulator side. This is important since the sides are completely electronically isolated from one another unless the jumpers are connected. Now, the interesting part J4; this is the connector which we will be using to program any devices that will not fit nicely in the socket on the LP. For use with the EZ430 you can connect the middle four pins to any of the target boards to program them (just make sure you match the pins up correctly). Pin 1 and 6 are the UART (serial) connection which is not nessesary for programming, but can be desirable for development purposes. Pin 2 through 5 are the SBW data pins and the power pins nessesary for programming the device.

On a side note, remember never to power a chip with a different supply than the programmer when programming unless you hook up some interesting circuitry to convert the logic levels. For example, if you are running a chip at 2.2V, and are trying to program it using the LP, which runs at 3.6V you should not hook the SBW pins to the microcomputer to program it. Its possible to get away with doing this, but it will deminish the life expentancy of your device. See this interesting article at SparkFun about logic levels and microcomputers. Don't worry about this too much, its easy to disconnect the power from your chip for programming to use the LP's power, or to even just pull your chip out (if you can).

Sheet 2: On the top right we see the power supply which shows a +3.6V. In the center on the right is the USB connector which connects to the TUSB device. The USB connector is connected to the TUSB IC, which then is connected to the F16X which is then hooked up to your target device using the SBW interface.

Sheet 3 shows the actual target socket with a few addition components. Most important (for me) is the connecter J6 which allows power from an external source if you do not want to use the 3.6V provided by the programmer. I like this because I plan on using a lower voltage for my project than 3.6V and I also plan on isolating my board from the computer with an opto-isolator.

As for other components, there are two buttons, one reset button and one general purpose button. Note that the pull-up resistors are connected to the pins directly and not shown near the buttons on the schematic. If you are curious as to why these are needed, leave a comment and I can elaborate (this is true for any questions you may have). One thing I do not like about this is that there are no jumpers here allowing one do disconnect the resistor from P1.3. This can cause a problem if I decide to use this pin for something else, now I have to be careful to work around this >.< At least they put jumpers in for the LEDs (on the bottom left of sheet 3), which allow you to connect LED1 and LED2 to P1.0 and P1.6 respectively. The external crystal also does not have jumpers which might cause some frustration if you want to use those ports for something else (more on this in a future post). At least from the picture on the wiki it doesn't seem like the device will ship with a crystal or resonator soldered in place. *crosses fingers*

Any other observations I missed? Or questions? Comments away. Hope these posts aren't too wordy.

-NJC





23 comments:

  1. Great walk through. Thanks!

    ReplyDelete
  2. can't believe i looked over this before. thanks for the help! very informative.

    ReplyDelete
  3. Here's a link to the USB device:
    http://focus.ti.com/docs/prod/folders/print/tusb3410.html

    ReplyDelete
  4. Hi NJC,
    First; thank you very much for posting these schematics.
    I have two questions, perhaps you could help?

    1) Could you confirm that this is correct? If I want an asynchronous, 3.3v, TTL connection to another microcontroller, all I should do is remove the TX/RX jumpers from J3 and connect TX/RX appropriately at P1.1/P1.2? I won't need any additional pull-up/down resistors right?

    2) Have you used the LaunchPad (LP) emulator (2 wire SBW) for programming other MSP430s that would typically require the 4 wire FET430 emulator?

    Thanks!

    ReplyDelete
  5. 1. If you mean hook another chip or device up to the MSP430 on the LaunchPad, yes, that is all that you would need to do. For UART you do not need pull-up/down resistors. Just make sure that both devices use the same supply voltage.

    2. The LaunchPad works great as a programmer as long as the devices can be programmed using the SBW (ex. MSP430F5510).

    Hope that answers your questions!

    ReplyDelete
  6. Are the schematics incomplete or am I blind?

    I can't find Jumper 3. How is VCC connected to EZ_VCC?

    ReplyDelete
  7. I have MSP430F5527 and I want to program to it with my Launchpad, what should I do?(how to connect 5 pins of J3 assign similar pins in F5527, or give me a direction to do that). Can You help me, please!

    ReplyDelete
  8. @Anonymous - J3 is in the first image with the large MSP430 that is used to program the target chip.

    @Hi - I will be writing a post on this as soon as I can. In the meantime, all you need to do is to connect the GND, RST, and TEST pins on the emulator side of the LaunchPad to the GND, RST, and TEST pins on your F55xx.

    Hope that helps!

    ReplyDelete
  9. @NJC - I will be writing a post on this as soon as I can. In the meantime, all you need to do is to connect the GND, RST, and TEST pins on the emulator side of the LaunchPad to the GND, RST, and TEST pins on your F55xx.

    Have you already done that?

    Thanks!

    ReplyDelete
  10. Yes, I have. It's actually my most recent post.

    http://www.msp430launchpad.com/2011/10/programming-devbo-and-external-targets.html

    Hope that helps!

    ReplyDelete
  11. Hi,
    Is it possible to use the MSP430 launchpad as a "usb to serial/TTL" interface so that I could use the UART of some other chip/deice to communicate with the PC?
    Like connecting the respective TXD nad RXD pins(of the device) to the launchpad.

    ReplyDelete
  12. It is possible, but I do not recommend it. The maximum baud rate the LaunchPad's integrated UART can handle is 9600. This is quite slow. I would recommend any cheap FTDI breakout instead.

    ReplyDelete
    Replies
    1. I'm fine with 9600 as the baud rate, but could you please elaborate on how to achieve this interface?

      Delete
  13. Ok thanks a lot, NJC. This is a great help. :)

    I'm aware of the 9600Bd rate limit and I'm planning to switch over to a FTDI breakout board if my application works to my expectations. But for now I'm gonna try this method.

    ReplyDelete
  14. Regarding that 9600 baud limit, I noticed that myself when I was first playing with the LaunchPad. I determined by hooking an oscilloscope to the P1.2 pin that the MSP430G2553 had no problem outputting hardware UART at a faster rate, but I never did figure out where the bottleneck between the microcontroller and the USB jack was. Would you have a quick explanation? Thanks.

    ReplyDelete
  15. CPT: it helps to visualize the flow of data here. Somehow you have to go from UART to USB which can be seen as a virtual com port on the computer (with the right drivers). The device which receives the UART from the MSP430G2553 and converts it to USB is the emulation side of the LaunchPad. The baud rate limitation is present physically on the LaunchPad and has nothing to do with the MSP430 inserted into the LaunchPad. This is why your scope showed the UART working at a faster rate. Hope that answers your question!

    ReplyDelete
    Replies
    1. That makes sense, thanks. So is it the TUSB3410 specifically that's slow to process UART coming in from the MSP430G2553, or are there other places somewhere along the chain that cause trouble? I take it that FTDI breakout boards use different hardware to overcome the problem...

      Delete
    2. It is most likely the MSP430F16x and not the TUSB3410. Remember that this is not necessarily a problem with the LaunchPad(from TIs perspective), but rather a design decision. The sad truth of the mater is that the LaunchPad costs $4.30, you can't expect too much from it. The FTDI board bypasses the LaunchPad all together and connects directly to the UART signal on the target MSP430.

      Delete
  16. Hi NJC,

    My LP came with MSP430G2553. I wanted to use the chip's USCI UART. I guess this is called HW UART.

    As a reference, I started with this code.

    http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/122671.aspx

    I am using IAR. The code compiled without any problem and downloaded smoothly to the target (G2553). I used "download and debug". It waited at the first instruction in main.
    ----------
    WDTCTL = WDTPW + WDTHOLD; // Stop WDT
    ----------
    I opened up registers window (view -> registers) and selected "watchdog timer". It showed WDTCTL=0x6900. That surprised me. Why would it be this value just after reset? I clicked on the (+) sign at the WDTCTL and all the bits were zero.
    WDTIS0=0
    WDTIS1=0
    WDTSSEL=0
    WDTCNTCL=0
    WDTTMSEL=0
    WDTNMI=0
    WDTNMIES=0
    WDTHOLD=0

    And still WDTCTL=0x6900 ????

    Anyway, I pressed "step into" button. Note that WDTCTL would have been loaded with 0x5A80. But the register window showed 0x6980. I was totally foxed. Then I opened watch window and added WDTCTL. Same value. 0x6980.

    Have you ever experienced this? This is my first ever encounter with MSP430 and IAR. I am experienced with PIC and MPLAB. I guess the experience should not be too different :)

    One thing, I did not change the J3 jumpers for Rxd and Txd which I should for HW UART to work. But that should not mess up the emulator to target communication via SBW.

    Am I missing something?

    Would appreciate your help.

    Regards,
    EG

    ReplyDelete
  17. Hi NJC,
    Sorry to bother you with the above question. I figured out the answer from page 355 of msp430x2xx User Guide (SLAU1441-Dec 2004, Revised Jan 2012) doc.

    Regards,
    EG

    ReplyDelete