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.

Serial Communication with Board

Other Parts Discussed in Thread: LAUNCHXL-F28027, MSP430FR5969

Hi, I was hoping for some help before purchasing a sensor/gps for my board. I have a C200 LaunchXL-F28027 board.

The project is for a semi-Autonomous Sailing boat. I need GPS, wind direction, wind speed, and compass heading. A Airmar sensor can provide all of those by Serial communication, however it is cheaper if i get the Airmar wx models which do everything except the GPS and purchase a GPS separately. 

The Airmar unit communicates by RS232 protocol and NMEA string format. I think the GPS will also use NMEA format but is not selected yet.

As a new programmer (almost no experience) will it be easy enough to read from a GPS and a Airmar independently on the same board and use information from both to constantly control a set of motors to turn the boat in the right direction?

Any help or advice would be appreciated.

  • Hello,
    If both a GPS and a Airmar use RS232 communication, you cannot use one F28027 because it only has one SCI (for RS232).
    Please first think more about the hardware connection before thinking about the firmware.

    Best regards,
    Maria
  • Maria,

    Thank you for your response. Is there no way to code a way to allow serial communication to take place on the other digital pins of the board, using software to replicate the functionality of the hardwired RX and TX lines. I not only want to use two serial based sensors (the GPS and the wind sensor), but also communicate between the boards. I have a low power MSP430FR5969 that i want to use to shut down the C2000 board when the battery is low and wait for them to recharge before resetting the system. I have a feeling this will be serial as well.

    If it is not posisble, are there GPS units you know of (i can do my own searching to select one) that do not use serial comm. via the Rx and Tx pins?

    Thanks,
    Nolan
  • You could bit bang the RS232 signal on any GPIO pin, but this can be a daunting task. If all you need is two serial ports then you can multiplex the single SCI on the 28027 since there are two sets of pins that bring this port out. GPIO28, GPIO29, GPIO12, and GPIO7 can bring out RX and TX. You would pick one pair GPIOs for connecting to the GPS and the other pair of GPIOs for connecting to the Airmar sensor. You would set up your SCI port for the baud and format needed and switch between ports by programming the GPIOs as General purpose ports when not needed for communication and then switch back to SCI mode when needed for com. You could then switch back and forth between the two devices and pole them for information as needed. If each device requires different baud rates or data format, then you would also need to change the SCI setup when switching from each device.

    If you need to communicate between the 28027 and the MSP430, then you could use the SPI port or the I2C port for this connection.

    Remember if your connections are all in the same box and are short distances then the serial connections can remain at 3.3 volt levels, but if you plan to go more than a few feet and from one box to another, then R2323 transceivers will need to be added at each end to drive the lines and provide ESD protection. Also if you stay at 3.3 volts the lower the baud rate the longer distance yo can go.
  • Hi Nolan,

    As Gary mentioned bit banging is a hectic task. There are multiple GPS units/mouses/modules that work with SPI too. Here is one of them:
    support.maestro-wireless.com/knowledgebase.php

    Hence you can use one with SCI and the other with SPI.

    Regards,
    Gautam
  • Gautam,

    Thank you. This is an interesting alternative which i will now spend a day or to doing my own research on.

    If i understand correctly the SCI requires use of the Rx/Tx pins (which there is only one set enabled). Is the SPI limited to certain pin numbers as well?

    Thanks,

    Nolan

  • Is the SPI limited to certain pin numbers as well?

    Yes, Nolan. Check for these pins on the controller for SPIA module:
    SPISOMIA
    SPISIMOA
    SPICLKA
    SPISTEA

    Similarly for SPIB module.

    Regards,
    Gautam
  • It looks to me like the 28027 has two sets of pins for the SCI. Both sets go to the same SCI, but you only need to talk to one device at a time anyway. So, you could use GPIO28 and GPIO29 for one SCI connection and GPIO12 and GPIO7 for the other connection, then multiplex in software. If you wish to use SPI, you can have several SPI devices on one SPI bus and use general purpose GPIO pins as chip selects to select each SPI bus. I have even seen some GPS modules with I2C, which also allows for several devices to share the same I2C bus as long as each has a unique address. So, it looks like you have multiple options, picking the correct one is just a matter of which one offers the easiest path for you.