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.

MSP430F67641: How to communicate with EVM430-F67641 using LaunchPad?

Part Number: MSP430F67641
Other Parts Discussed in Thread: MSP430G2553, ENERGIA, EVM430-F67641, MSP-ISO, , MSP-EXP430G2ET, MSP-EXP430FR4133

Hi,

I want to read parameters (current, voltage, power etc..) from F67641 e-meter and send them to MSP430G2553 Launchpad.

I tried to connect it to PC through RS-232, as described in  http://www.ti.com/lit/an/slaa621c/slaa621c.pdf

and it works good, I see everything on my screen in GUI Source Code program.

Now it's time to communicate with LaunchPad, for example, that I could see all parameters in Energia's Serial Monitor.
How to do it properly?

Regards, Superpanky

  • Hello Superpanky,

    Thanks for your post. First, I would sniff the UART communication (with the EVM430-F67641 disconnected from the high voltage AC obviously) at the TX_EN and RX_EN headers located between the RS-232 and isolation circuitry and the MCU. The GUI is most likely sending commands to the MCU which triggers it to start reporting of those parameters. You can use a logic analyzer.

    Then, when you've figured out how the communication works, you could use your LaunchPad to pass the commands to the EVM430-F67641 and read back the results over UART. For isolation when the EVM430-F67641 is connected to high voltage AC, you could use jumper wires and the MSP-ISO adapter board. An alternative approach would be to use the back-channel UART on the LaunchPad's on-board debugger to pass the commands/data from the EVM430-F67641 to a terminal using the Application COM port on your PC.

    Although the MSP430F67641 is not supported, I still wanted to make you aware of our latest Energy Measurement Design Center (EMDC) and Software Library. The GUI allows you to quickly configure the software library, view results, and calibrate your system when using MSP430F674x(A), F676x(A), F677x(A), and i20x1 devices. There are several example EMDC projects and related, pre-calibrated binary images that you can use for evaluation. Then, you can use these projects (or create a new one) for your design. If you ever switch from the F67641 to one of the supported devices, you can learn more by visiting the EMDC product folder.

    Energy Measurement Design Center for MSP430 MCUs

    [FAQ] MSP-EM-DESIGN-CENTER: Announcing the new Energy Measurement Design Center (EMDC) and Software Library for MSP430 MCUs!

    Regards,

    James

  • Thank you for your answer, James

    I investigated RX/TX jumpers and saw, that, by removing them, it disconnects the EVM430-F67641 communication with the computer. Probably it is correct?

    Question Nr.1 --- In the Application report I found the circuit below. If I understand correctly it is allready isolated. So do I still need to purchase this MSP-ISO?

    Question Nr.2 (regarding to Question Nr.1) --- Do I need to take 3 pins: RX,TX and GND from Energometer's RS-232 cable and do I need to connect them to my MSP430G2553 LaunchPad pins, for example, P1.1, P1.2, GND ? Is this a correct approach?

    Regards, Superpanky

  • Hello,

    superpanky said:
    I investigated RX/TX jumpers and saw, that, by removing them, it disconnects the EVM430-F67641 communication with the computer. Probably it is correct?

    Yes, that's correct. Those jumpers disconnect the UART lines between [the MCU] and [the on-board isolators plus RS-232 level shifting circuitry].

    superpanky said:
    Question Nr.1 --- In the Application report I found the circuit below. If I understand correctly it is allready isolated. So do I still need to purchase this MSP-ISO?

    Again, the isolators are connected to UART signals on one side and the RS-232 signals on the other side. Since you want to connect directly to that UART interface (which isn't isolated), this is why I recommended the MSP-ISO board. An alternative method could be to rework the RS-232 circuitry and somehow connect to the UART signals after the isolators, but I would expect that to be challenging and time consuming.

    superpanky said:
    Question Nr.2 (regarding to Question Nr.1) --- Do I need to take 3 pins: RX,TX and GND from Energometer's RS-232 cable and do I need to connect them to my MSP430G2553 LaunchPad pins, for example, P1.1, P1.2, GND ? Is this a correct approach?

    Assuming isolation is not necessary for a moment, you would connect your LaunchPad pins P1.1, P1.2, and GND to the EVM430-F67641 pins TX_EN, RX_EN, and GND. As an intermediate step, you could view the data in a terminal using the application (or back-channel) UART functionality of the LaunchPad's onboard debugger (read more here). If you have questions about the back-channel UART, there are many posts on E2E discussing what this is and how to use it. The MSP-ISO would provide an isolated connection to your PC to help protect it and you when the EVM430-F67641 is connected to high voltage AC.

    Regards,

    James

  • Thank you for your answer, James

    1) I'm still not sure if I understand correctly. I imagine my connection like this:

    Is it correct? Now my Launchpad is on the isolated side of photocoupler and it should be safe, i guess?

    2) With this connection, I planned to program, for example, launchpad's pin P1.1. as digital output and pin P1.2. as digital input (correspondingly transmitting Tx and receiving Rx data). Is this a good way?

    Many thanks in advance,

    Regards, Superpanky

  • superpanky said:
    Is it correct? Now my Launchpad is on the isolated side of photocoupler and it should be safe, i guess?

    This is not correct. Please read through my earlier comments. You'll damage your LaunchPad connecting it as you show here because the signals are RS-232 levels, which can range from -13VDC to 13VDC. Older PCs would have serial ports that you could directly plug into the EVM. You can buy RS-232-to-USB adapters to plug into your PC's USB port. These adapters convert the RS-232 signals down to the 5V USB signals which are safe for your PC.

    [MSP430F67641 UART TX/RX pins] <-----> [Isolators] <-----> [RS-232 conversion circuitry] <-----> [RS-232 connector] <-----> [RS-232-to-USB adapter] <-----> [PC]

    If you'd like to communicate with the MSP430F67641 using your LaunchPad, it operates 3.3VDC (typically), so you don't need voltage logic level translators. Ignore everything else besides the [MSP430F67641 UART TX/RX pins] above for this configuration. Obviously, there's not isolation yet between your LaunchPad and your PC, which is dangerous when the EVM430-F67641 is connected to high voltage AC. This is where the MSP-ISO comes into play. When used correctly, it isolates the target side of the LaunchPad safely while allowing communication with your PC. The isolation is just done differently than what's on the EVM430-F67641 but functions the same way.

    [MSP430F67641 UART TX/RX pins] <-----> [Jumper wires] <-----> [MSP-ISO adapter] <-----> [Jumper wires] <-----> [LaunchPad UART TX/RX pins] <-----> [PC]

    Does this make sense?

    RS-232 vs. TTL Serial Communication

    Serial Communication

    superpanky said:
    2) With this connection, I planned to program, for example, launchpad's pin P1.1. as digital output and pin P1.2. as digital input (correspondingly transmitting Tx and receiving Rx data). Is this a good way?

    If by "digital" you mean using the USCI I2C functionality, then yes.

    Regards,

    James

  • Thank you, James. Yes, I allready used DB9 connector adapter to USB, to test GUI program. Few more questions:

    1) Could you confirm, if then this corrected connection is right?  And where should I connect LaunchPad's GND pin?

     

    2) I guess, here is no difference if RX_EN, TX_EN jumpers are connected or not (if I am not using RS-232 (DB9) cable anymore)?

    3) I see, that MSP-ISO pins are not compatible with my MSP430G2553 (MSP-EXP430G2). Does it mean, that together with ISO board, I need to order also a new Launchpad (for example, as the one in fig. above)?

    3)                If by "digital" you mean using the USCI I2C functionality, then yes.
    By "digital" I mean using simple "Energia" command, as, for example, PINMODE(P1_1, OUTPUT), setting this pin to digital output. Could you express your opinion about that?

    4) So far discussion was only about hardware, but my objective is to get analog measurements in serial monitor on my PC, to use them to control other external devices.
    By using RX, TX data communication I will probably get a long string with 1's and 0's ? Will I be able to convert it to a normal analog values?

    Regards, Superpanky

  • Dear James,
    Could you please provide an answer?
    Thank you in advance.
    Regards, Superpanky
  • superpanky said:
    1) Could you confirm, if then this corrected connection is right?  And where should I connect LaunchPad's GND pin?

    As long as you're connecting the F67641's TX pin to your LaunchPad's RX pin and the F67641's RX pin to your LaunchPad's TX pin, it should work. For the GND connection, there are several GND headers spread across the EVM430-F67641.

    superpanky said:
    2) I guess, here is no difference if RX_EN, TX_EN jumpers are connected or not (if I am not using RS-232 (DB9) cable anymore)?

    Disconnect them.

    superpanky said:
    3) I see, that MSP-ISO pins are not compatible with my MSP430G2553 (MSP-EXP430G2). Does it mean, that together with ISO board, I need to order also a new Launchpad (for example, as the one in fig. above)?

    You could carefully use jumper wires to make the MSP-ISO work with your LaunchPad, but it'd be easier, quicker, and probably safer to just order the newer MSP-EXP430G2ET LaunchPad. I confirmed that MSP-ISO works with this LaunchPad.

    superpanky said:
    3)                If by "digital" you mean using the USCI I2C functionality, then yes.
    By "digital" I mean using simple "Energia" command, as, for example, PINMODE(P1_1, OUTPUT), setting this pin to digital output. Could you express your opinion about that?

    I'm not familiar with this Energia command (since I use register-level or DriverLib-level code in CCS), but it seems to be configuring P1.1 as a GPIO and making it an output. If you'd like to use the USCI functionality, you'll need to change the P1SEL.x and P1SEL2.x bits according to Table 16 in the datasheet. If you have questions about doing this in Energia, then I would encourage you to search our E2E forum and the 43oh.com forum for instructions on how to do this (since many other users have tried to do this before).

    superpanky said:
    4) So far discussion was only about hardware, but my objective is to get analog measurements in serial monitor on my PC, to use them to control other external devices.
    By using RX, TX data communication I will probably get a long string with 1's and 0's ? Will I be able to convert it to a normal analog values?

    If you just need to get the analog measurements from the EVM430-F67641 to a terminal window on your PC, why can't you just use the RS-232-to-USB serial adapter? The serial port doesn't depend on the GUI - it just uses the port to send and receive commands to and from the EVM. You wouldn't need your LaunchPad in this case unless I'm missing something. You'll have to learn about the protocol and the supported commands. I like using the Serial Port Utility for these types of exercises.

    Regards,

    James

  • Many thanks for all answers, James! I really appreciate.

    If you just need to get the analog measurements from the EVM430-F67641 to a terminal window on your PC, why can't you just use the RS-232-to-USB serial adapter? The serial port doesn't depend on the GUI - it just uses the port to send and receive commands to and from the EVM. You wouldn't need your LaunchPad in this case unless I'm missing something.

    In fact, my objective is to display all EVM430-F67641 measurements into a separate LCD display - basically it means to double the displaying. Since I know how to send simple measurements from serial monitor to lcd, that's why I was thinking about first to see data on any serial monitor software.

    Maybe you have other suggestions?

    Regards, Superpanky

  • superpanky said:
    In fact, my objective is to display all EVM430-F67641 measurements into a separate LCD display - basically it means to double the displaying. Since I know how to send simple measurements from serial monitor to lcd, that's why I was thinking about first to see data on any serial monitor software.

    How far apart does the duplicate LCD need to be in the final design? If it's far, then you may want to think about adding wireless connectivity using a SimpleLink MCU at some point. On the flip side, let's assume it can be close to the EVM430-F67641, so a wired connection would work. Then, you could perhaps use the MSP-EXP430FR4133 LaunchPad (instead of the MSP-EXP430G2ET) since it features an on-board LCD.

    Regards,

    James

  • Than you, James

    It will be close and not so far. So maybe I will use your suggested MSP-EXP430FR4133.

    Last thing: Could you suggest some basic tips for writing a simple program for this RX TX data transmission?

    Regards, Superpanky

  • Than you, James

    It will be close and not so far. So maybe I will use your suggested MSP-EXP430FR4133.

    Last thing: Could you suggest some basic tips for writing a simple program for this RX TX data transmission? To have analog measurements on this doubled-lcd

    Regards, Superpanky

  • superpanky said:
    It will be close and not so far. So maybe I will use your suggested MSP-EXP430FR4133.

    The MSP-ISO should support this LaunchPad too.

    superpanky said:
    Last thing: Could you suggest some basic tips for writing a simple program for this RX TX data transmission? To have analog measurements on this doubled-lcd

    If you're using Energia, I'm not very familiar with that ecosystem. I'd point you to the UART RX and TX code examples in CCS that are C-based. There are register-level examples but there should also be DriverLib examples which are in between the register-level and Energia-level code. Obviously, you're not the first user trying to implement UART communication, so it's very advantageous for you that there are a LOT of threads about this on E2E and I'm sure the same applies to Energia's 43oh.com forum.

    Regards,

    James

**Attention** This is a public forum