I'm trying to read GPS data through a uart connection and print it to an SD card. To test, I just printed out all of the data to Tera Term and ran into a problem using printf.
GPRMC,000634.964,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*76
GPRMC,000635.014,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*79
GPVTG,051.5,T,,M,000.0,N,000.0,K,A*0C
GPRMC,000635.064,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7E
GPRMC,000635.114,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*78
GPRMC,000635.164,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7F
GPRMC,000635.214,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7B
GPRMC,000635.264,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7C
GPRMC,000635.314,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7A
GPRMC,000635.364,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7D
GPRMC,000635.414,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7D
GPRMC,000635.464,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7A
GPRMC,000635.514,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7C
GPRMC,000635.564,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7B
GPRMC,000635.614,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7F
GPRMC,000635.664,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*78
GPRMC,000635.714,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7E
GPRMC,000635.764,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*79
GPRMC,000635.814,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*71
GPRMC,000635.864,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*76
GPRMC,000635.914,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*70
GPRMC,000635.964,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*77
GPRMC,000636.014,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7A
GPVTG,051.5,T,,M,000.0,N,000.0,K,A*0C
GPRMC,000636.064,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7D
GPRMC,000636.114,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7B
GPRMC,000636.164,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7C
GPRMC,000636.214,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*78
$GPRMC,001425.964,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*75
$GPRMC,001426.010842,W,000.0,051.5,090212,,,A*78
$GPVTG,051.5,T,,C
$GPRMC,001426.064,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7F
$GPRMC,001426.110842,W,000.0,051.5,090212,,,A*79
$GPRMC,001426.164,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7E
$GPRMC,001426.210842,W,000.0,051.5,090212,,,A*7A
$GPRMC,001426.264,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7D
$GPRMC,001426.31.0842,W,000.0,051.5,090212,,,A*7B
$GPRMC,001426.364,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7C
$GPRMC,001426.410842,W,000.0,051.5,090212,,,A*7C
$GPRMC,001426.464,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7B
$GPRMC,001426.515.0842,W,000.0,051.5,090212,,,A*7D
$GPRMC,001426.564,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7A
$GPRMC,001426.610842,W,000.0,051.5,090212,,,A*7E
$GPRMC,001426.664,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*79
$GPRMC,001426.71.0842,W,000.0,051.5,090212,,,A*7F
$GPRMC,001426.764,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*78
$GPRMC,001426.81842,W,000.0,051.5,090212,,,A*70
$GPRMC,001426.864,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*77
$GPRMC,001426.910842,W,000.0,051.5,090212,,,A*71
$GPRMC,001426.964,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*76
$GPRMC,001427.010842,W,000.0,051.5,090212,,,A*79
$GPVTG,051.5,T,,
$GPRMC,001427.064,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7E
$GPRMC,001427.110842,W,000.0,051.5,090212,,,A*78
$GPRMC,001427.164,A,4517.3274,N,07555.0842,W,000.0,051.5,090212,,,A*7F
$GPRMC,001427.21.0842,W,000.0,051.5,090212,,,A*7B
Any ideas as to why it starts to chop off or lose characters when I output the data with printf?
Hi,
I'm trying to read GPS data through a uart connection and print it to an SD card. To test, I just printed out all of the data to Tera Term and ran into a problem using printf.
Code with putc:
output:
Code with printf:
output
Any ideas as to why it starts to chop off or lose characters when I output the data with printf?
Thanks for the help, Sebastian