Scratchpad RAM and qualifiers

MPep

Senior Member
Hi Technical,

I can see definite uses for the scratchpad RAM for GPS data input. Although any data input type could be used of course.

I already know how to specify a start character to start recording data.

What I want to have is the ability to specify an "end/stop" character.

The way I read it is that you have to specify how many bytes are received via @incptr.

However, some GPS engines have a variable length string, eg: depending on if there is an actual speed to be sent. If the GPS determines that the object is stationary, some GPSs output an empty field, thereby shortening the overall sentence, eg ,, instead of ,012.4,.

Could this be done at some stage?

I realise that one proviso must be that the total number of bytes to be received never exceeds the RAM size. This should not be an issue for NMEA data as the maximum length should be 80bytes.

Regards,
Mark.
 

Technical

Technical Support
Staff member
If you background receive your hserin data into the scratchpad the hserptr variable tells you how many bytes have been received (technically it tells you the next scratchpad address that will be written to, but if you start at 0 this is the same value as number of bytes received).

Or in your case you could just scan the scratchpad until you find the desired end character.
 
Top