Hi,
This is my first post but I have been checking out the site for a while using code examples to learn different ways to manipulate data e.c.t
I am currently playing with a serial GPS mouse and I have programmed the pic with different routines and code to learn what can be achieved.
My current project is based on a pic 16-F-628A and it reads the GPS data stream that I have set up and I can print out the saved arrays in any location from the array using the array based address system, but I am having trouble understanding how the data is saved as when I save the portions of the array to a variable and manipulate the data - I get unexpected results.

Here is a sample of my code

POS_STAT VAR BYTE
LAT var byte [9]
LON var byte [10]
LAT_N_S VAR BYTE
SPEED VAR BYTE

READ_GPS:
SERIN2 portb.4,16572,2000,FAULT,[WAIT("$GPRMC,"),wait (","),POS_STAT,wait (","),STR LAT\9,wait (","),LAT_N_S, wait (","), STR LON\10, wait (","),LON_E_W, wait (","), DEC3 SPEED]

When I send the data from the program as follows :

SEROUT2 portb.2,84,[LAT_N_S,STR LAT\9,LON_E_W,STR LON\10,"SPEED", DEC3 SPEED,10,13]

It prints out fine.
When I goto manipulate the data I get unexpected results.
DEGLAT = LAT[0]
I = LAT[1]

SEROUT2 portb.2,84,[LAT_N_S,DEGLAT,I,LON_E_W,STR LON\10,"SPEED", DEC3 SPEED,10,13]
DELGAT = 3 --- I = 6 INSTEAD OF 8

THE STRING CONTAINS FROM 0 TO 9 ...(3810.7890)
I am wondering if the array has signed integer e.g 38 10 . 7890 or 3,8,1,0,.,7,8,9,0 ??????

Any help would be appreciated.
Thanks in advance Benny007