thanks for the reply.. i understand that a lot more than i did before... my lcd is currently not working, and i dont know why, so as soon as i get it fixed, or i get another, i will retry writing the code using your example...
thanks
danny
thanks for the reply.. i understand that a lot more than i did before... my lcd is currently not working, and i dont know why, so as soon as i get it fixed, or i get another, i will retry writing the code using your example...
thanks
danny
OK, i think ive got the basics of how to do this... im sorry if it seems like im asking you all to write the code for me, but im not... im just one of those people that figure the best way to learn is from examples.. i have tried changing leinske's code to make it display with a serial lcd, and what data it displays... i got it to work, except for displaying the course... thanks for that, i learnt a lot from it.... i just learned that my gps does output GPAPB sentences (only outputs it if there is a route active), and so i changed the code for it... i just want to display waypoint name and distance and direction for some geocaching stuff i am working on... when i try to compile, it says that there is an error. it says "expected ]"... i know its probably a stupid mistake somewhere, but i cant find it.... im using a 16f88 at 10mhz, with an epic programmer... the gps is a sporttrak map.... thanks for all the help...
@ DEVICE HS_OSC
DEFINE OSC 10
cmcon = 7
TRISA = %00000000
'variables
'-------------------------------------------------------------
lcd VAR PORTA.3
gpsin VAR PORTB.0
GPAPB_IN VAR BYTE
TimeOut CON 3000
baudGPS CON 24764 '16572 + 8192 (bit 13)
blink VAR BYTE 'SNR warning
warning VAR BYTE 'cycle warning
xtrack VAR WORD 'crosstrack error
lrcorrect VAR WORD 'steer right or left to correct
xtrackunits VAR BYTE 'cross track error units n or k
arrivalcircle VAR WORD 'arrival alarm circular
arrivalperp VAR WORD ' arrival alarm perpendicular
magbear VAR WORD 'origin to dest 'magnetic bearing
dest VAR WORD 'destination ID
bear VAR WORD 'position to dest
head VAR WORD 'heading to steer
'initialize variables
'setup serial lcd
'-------------------------------------------------------------
Pause 5000
SerOut2 lcd, 32,[254,"X"] 'clear screen
Pause 100
'main program
'-------------------------------------------------------------
GPS: 'read GPS
SerIn2 GPSin,baudGPS,Timeout,Nogps,[wait("$GPAPB"), wait(","), blink, wait(","), warning, wait(","), DEC2 xtrack, wait(","), lrcorrect, wait(","), xtrackunits, wait(","), arrivalcirlce, wait(","), arrivalperp, wait(","), DEC3 magbear, wait(",$,"), mag, wait(","), dest, wait(","), DEC3 bear, wait(","), DEC3 head]
SerOut2 lcd, 32,[254,"G",4,1]
SerOut2 lcd, 32,[#lrcorrect," "]
SerOut2 lcd, 32,[254,"G",1,2]
SerOut2 lcd, 32,[#magbearing," "]
SerOut2 lcd, 32,[254,"G",4,2]
SerOut2 lcd, 32,[#mag," "]
SerOut2 lcd, 32,[254,"G",1,3]
SerOut2 lcd, 32,[#dest," "]
SerOut2 lcd, 32,[254,"G",4,3]
SerOut2 lcd, 32,[#magbear," "]
SerOut2 lcd, 32,[254,"G",1,1]
SerOut2 lcd, 32,[#maghead," "]
Pause 500
GoTo gps
Nogps:
Pause 100
SerOut2 lcd, 32,[254,"X"]
SerOut2 lcd, 32,[254,"G",5,2]
SerOut2 lcd, 32,[" NO GPS"]
Pause 100
GoTo GPS
Bookmarks