Close or Esc Key

Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

convery nmea ASCII string into binary

2 posts / 0 new
Last post
jay's picture
Last seen: 6 years 2 weeks ago
Joined: 08/09/2011 - 13:48
convery nmea ASCII string into binary



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:)

GANEEV SINGH's picture
Last seen: 7 months 2 weeks ago
Joined: 22/07/2013 - 16:08
Hi JayEach character in that

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:




   pin=1; //High


   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 :)