element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Frank Milburn's Blog AIS Alarm - First AIS Messages
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fmilburn
  • Date Created: 31 Dec 2017 4:21 PM Date Created
  • Views 1336 views
  • Likes 3 likes
  • Comments 0 comments
Related
Recommended

AIS Alarm - First AIS Messages

fmilburn
fmilburn
31 Dec 2017

Project Objective: Develop an open source AIS Alarm that alerts sailors that a new marine vessel with AIS is within range

 

In this post the dAISy receiver will be connected and the first AIS messages received.

image

The green LED on dAISy indicates an AIS message!

 

The dAISy receiver is easily accessible.  A header is provided with RX, TX, GND, 5V, 3V3, and even RST and TST for the very brave.  Here TX on dAISy has been connected to RX on the FR2111 prototype breadboard.  The antenna is connected on the left bottom connection of dAISy and power is coming in on the right.  Things worked too after I remembered to connect GND between dAISy and the prototype.  Doh!

 

There is debug capability for dAISy available over the USB connection.  By default the serial connection of dAISy on the header described above is inactive.  The photo below shows a configuration window open in a terminal session and serial made active at 38400 baud.  Don't forget to save the settings!  All of this is explained in the dAISy manual.

image

And for those who want to see what AIS NMEA messages looks like, here they are streaming into the debug window:

image

Now it is time to see if the messages are being received properly by the prototype.  Main() in the code was modified to check UART for incoming characters and store them into a temporary buffer called incoming.  When the special character '\n' is detected then the message is complete and the message is placed into TX buffer of UART character by character.

int main(void) {
    WDT_A_hold(WDT_A_BASE);                    // stop the watch dog
    PMM_unlockLPM5();                          // activate port settings after power on
    initClocks();
    initGPIO();
    initTimerB0();
    initUART();
    __bis_SR_register(GIE);                    // globally enable interrupts
    for(;;){
        // Manage incoming NMEA sentences
        static int i = 0;                      // tracks charachters read from UART
        while (RXFlag == 1){                   // read incoming chars
            if (i < MSG_LEN-1){                // do not overrun temporary buffer        *** How to handle error?
                incoming[i] = (char) RXData;   // store in temporary buffer
                RXFlag = 0;                    // reset flag
            }
            incoming[++i] = 0;                 // store end of string at next location
            if (incoming[i-1] == '\n'){        // newline indicates end of NMEA sentence
                size_t length = strlen(incoming);
                int j = 0;
                for(j = 0; j < length; j++){
                    TXData = incoming[j];
                    EUSCI_A_UART_transmitData(EUSCI_A0_BASE, TXData);
                    while(EUSCI_A_UART_queryStatusFlags(EUSCI_A0_BASE,EUSCI_A_UART_BUSY)){
                        // Wait until complete
                    }
                }
                incoming[0] = 0;               // reset temporary buffer
                i = 0;                         // reset counter
            }
        }
    }
}

 

The logic analyzer was set up to read both incoming and outgoing activity on the prototype.  The entire incoming and outgoing NMEA messages from the prototype cannot be fit into one window in the logic analyzer and still be read.  But the following screen shot shows the two sentences compressed and further checking shows a perfect match.

image

This is real progress.  Now to set up the ring buffer and see if memory is looking sufficient to store the desired 16 messages.

 

Past Posts from this Project:

AIS Alarm

AIS Alarm - The Process

AIS Alarm - Prototype Hardware

AIS Alarm - Timers and GPIO

AIS Alarm - Prototype Code Outline

AIS Alarm - UART

 

References and Links:

WEGMATT LLC - dAISy AIS Receiver - low cost AIS receiver

Texas Instruments MSP430FR2xx FRAM Microcontrollers - Post No. 4

TI MSP430FR2111

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube