EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / convery nmea ASCII string into binary

convery nmea ASCII string into binary

|

Microcontroller › AVR › convery nmea ASCII string into binary

  • This topic has 1 reply, 2 voices, and was last updated 8 years, 5 months ago by GANEEV SINGH.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • October 3, 2011 at 10:53 am #1292
    jay
    Participant

    Hi,

     

    i would like to know how do i convert the GPS NMEA ASCII string into binary?

     

    I was told to use bit masking to do it, how?

     

     

    i wanted to convert into Binary and then put through a FSK modulator, for transmission.

     

    Thanks in advance:)

    January 9, 2017 at 6:18 pm #14334
    GANEEV SINGH
    Participant

    Hi Jay

    Each character in that string represents a single byte and we know that a byte consists of eight bits, so what bit masking means is that you try and extract these bytes bit by bit. 

    Let us consider an example, let byte be an integer variable storing a single character (ASCII value) of GPS string at a time. Then to apply a bit masking on it will be done somewhat like this:

    for(i=0;i<8;i++)

    {

     if((byte&(1<<i))==1)

       pin=1; //High

    else

       pin=0; //Low

      delay(10); //a small delay

    }

    Here pin is a source for FSK modulator with bit values. This fashion transmits lowest significant bit first.

    Hope this helps :)

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Can I make two inputs from one?? June 17, 2025
  • Photo interrupter Connections June 17, 2025
  • Is AI making embedded software developers more productive? June 17, 2025
  • Why can't I breadboard this oscillator? June 17, 2025
  • Cataract Lens Options? June 16, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise