ChriX
Member
I've been trying to add more NMEA sentences stored as data tables to the program for my GPS project, but am getting strange results. I can only describe the problem - don't really want to post my full code as it's a bit messy at the moment and you will all laugh
Right, so previously I had the following two sentences stored:
This works fine, and im using a simple loop to retreive each character and send it. However, if I try to add another sentence above these two, when the bottom one is due to be sent, it only sends half of the string, and then the PIC resets - it's like i've used all the memory or something, which shouldn't be the case as i'm using a 16F628 and when programming the software states 850 ish words. I get the same result when I make one of the above two strings a lot longer, the loop only sends part of it and then the PIC resets. I have tried putting all of the data tables on a different page in memory but then it doesn't send anything (apart from the CR/LF at the end of the send loop).
This is the loop i'm using to send each character:
Thanks for any help!
Right, so previously I had the following two sentences stored:
Code:
gpgga addwf PCL, F
DT "$PSRF103,00,01,00,00", 0
gpvtg addwf PCL, F
DT "$PSRF103,05,01,00,00", 0
This works fine, and im using a simple loop to retreive each character and send it. However, if I try to add another sentence above these two, when the bottom one is due to be sent, it only sends half of the string, and then the PIC resets - it's like i've used all the memory or something, which shouldn't be the case as i'm using a 16F628 and when programming the software states 850 ish words. I get the same result when I make one of the above two strings a lot longer, the loop only sends part of it and then the PIC resets. I have tried putting all of the data tables on a different page in memory but then it doesn't send anything (apart from the CR/LF at the end of the send loop).
This is the loop i'm using to send each character:
Code:
messgga
clrf loop
msgloop movf loop,W
call gpgga
addlw 0
btfsc STATUS,Z
goto msgdone
call send
incf loop,F
goto msgloop
msgdone
movlw 0x0D ; CR
call send
movlw 0x0A ; LF
call send
return
Thanks for any help!