Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

GPS locator bascom program

Status
Not open for further replies.

amirtaha2541

Junior Member level 1
Joined
Aug 22, 2009
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,417
In the following program:
1- How is the location marked?
2- Multiple locations can be marked?
AND
3- What is the meaning of Following Commands :
Place(x) = &H20
&
If Gps = 125 Then Goto Looploops



$regfile = "2313def.dat"

'XTAL = 3.68 MHZ
$crystal = 3686400

'By default the modem works at 4800 baud
$baud = 4800


Config Lcd = 16 * 2
Config Lcdpin = Pin , Rs = Portb.7 , E = Portb.6 , Db4 = Portb.5 , Db5 = Portb.4 , Db6 = Portb.3 , Db7 = Portb.2
Config Portb = Output
Config Keyboard = Pind.6 , Data = Pinb.0 , Keydata = Keydata

'$GPGGA,012211.83,4119.6171,N,07730.0636,W,1,03,3. 6,00522,M,,,,*36

Dim Gps As Byte , X As Byte , Lont(12) As Byte
Dim Flag As Bit

Dim Place(16) As Byte
Dim Temp As Byte

Dim Mydata(12) As Byte
Dim Myplace(16) As Byte

Dim Eepromdata(12) As Eram Byte At &H01
Dim Eepromplace(16) As Eram Byte At &H10

'Buzzer Alias Pinb.1

Mark Alias Pind.2
Config Mark = Input


'Set Pinb.1
Portb = &B0000000
For X = 1 To 12
Mydata(x) = Eepromdata(x)
Next
For X = 1 To 16
Myplace(x) = Eepromplace(x)
Next

Flag = 0


Looploops:
Cls
Cursor Off

Looploop:
Home
Upperline

Startloop:
If Mark = 0 Then Goto Mark_place
Gps = Waitkey()
If Gps <> "$" Then Goto Startloop
Gps = Waitkey()
If Gps <> "G" Then Goto Startloop
Gps = Waitkey()
If Gps <> "P" Then Goto Startloop
Gps = Waitkey()
If Gps <> "G" Then Goto Startloop
Gps = Waitkey()
If Gps <> "G" Then Goto Startloop
Gps = Waitkey()
If Gps <> "A" Then Goto Startloop
Gps = Waitkey()
If Gps <> "," Then Goto Startloop
For X = 1 To 6
Gps = Waitkey()
Next X
Timlop:
Gps = Waitkey()
If Gps = "," Then Goto Getlat
Goto Timlop
Getlat:

For X = 1 To 6
Getlat1:
Gps = Waitkey()
If Gps = "." Then Goto Getlat1
Lont(x) = Gps
Lcd Chr(gps);
If X = 2 Then Lcd ".";
If X = 4 Then Lcd ".";
Next X
Getlat2:
Gps = Waitkey()
If Gps <> "," Then Goto Getlat2
Gps = Waitkey()
Lcd Chr(gps) ; " ";

Gps = Waitkey()
Gps = Waitkey()
Lowerline
For X = 7 To 12
Getlon:
Gps = Waitkey()
If Gps = "." Then Goto Getlon
Lont(x) = Gps
Lcd Chr(gps);
If X = 8 Then Lcd ".";
If X = 10 Then Lcd ".";
Next X
Getlon1:
Gps = Waitkey()
If Gps <> "," Then Goto Getlon1
Gps = Waitkey()
Lcd Chr(gps);



If Mydata(3) = Lont(3) Then
If Mydata(4) = Lont(4) Then
If Mydata(5) = Lont(5) Then
If Mydata(6) = Lont(6) Then
If Flag = 0 Then
Cls
Portb = &B0000010
For X = 1 To 16
Lcd Chr(myplace(x))
Next
Wait 10
Cls
Flag = 1
Portb = &B0000000
End If
Else
Flag = 0
End If
End If
End If
End If



Goto Looploop

End

Mark_place:
Cls
Lcd " Enter the Name"
Lowerline
Cursor On Blink
For X = 1 To 16
Place(x) = &H20
Next
X = 1

Mark_places:
Gps = Getatkbd()
If Gps = 125 Then Goto Looploops
If Gps = 13 Then
If X = 0 Then
Goto Mark_place
Else
For X = 1 To 12
Eepromdata(x) = Lont(x)
Mydata(x) = Lont(x)
Next
For X = 1 To 16
Eepromplace(x) = Place(x)
Myplace(x) = Place(x)
Next

Cls
Lcd "Place Marked"
Flag = 1
Wait 2
Goto Looploops
End If
Elseif Gps > 0 Then
If X <> 17 Then
Lcd Chr(gps)
Place(x) = Gps
X = X + 1
End If
End If
Goto Mark_places


Keydata:
'normal keys lower case
Data 0 , 0 , 0 , 0 , 0 , 200 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , &H5E , 0
Data 0 , 0 , 0 , 0 , 0 , 113 , 49 , 0 , 0 , 0 , 122 , 115 , 97 , 119 , 50 , 0
Data 0 , 99 , 120 , 100 , 101 , 52 , 51 , 0 , 0 , 32 , 118 , 102 , 116 , 114 , 53 , 0
Data 0 , 110 , 98 , 104 , 103 , 121 , 54 , 7 , 8 , 44 , 109 , 106 , 117 , 55 , 56 , 0
Data 0 , 44 , 107 , 105 , 111 , 48 , 57 , 0 , 0 , 46 , 45 , 108 , 48 , 112 , 43 , 0
Data 0 , 0 , 0 , 0 , 0 , 92 , 0 , 0 , 0 , 0 , 13 , 0 , 0 , 92 , 0 , 0
Data 0 , 60 , 0 , 0 , 0 , 0 , 8 , 0 , 0 , 49 , 0 , 52 , 55 , 0 , 0 , 0
Data 48 , 44 , 50 , 53 , 54 , 56 , 125 , 0 , 0 , 43 , 51 , 45 , 42 , 57 , 0 , 0

'shifted keys UPPER case
Data 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
Data 0 , 0 , 0 , 0 , 0 , 81 , 33 , 0 , 0 , 0 , 90 , 83 , 65 , 87 , 34 , 0
Data 0 , 67 , 88 , 68 , 69 , 0 , 35 , 0 , 0 , 32 , 86 , 70 , 84 , 82 , 37 , 0
Data 0 , 78 , 66 , 72 , 71 , 89 , 38 , 0 , 0 , 76 , 77 , 74 , 85 , 47 , 40 , 0
Data 0 , 59 , 75 , 73 , 79 , 61 , 41 , 0 , 0 , 58 , 95 , 76 , 48 , 80 , 63 , 0
Data 0 , 0 , 0 , 0 , 0 , 96 , 0 , 0 , 0 , 0 , 13 , 94 , 0 , 42 , 0 , 0
Data 0 , 62 , 0 , 0 , 0 , 8 , 0 , 0 , 49 , 0 , 52 , 55 , 0 , 0 , 0 , 0
Data 48 , 44 , 50 , 53 , 54 , 56 , 0 , 0 , 0 , 43 , 51 , 45 , 42 , 57 , 0 , 0
 

Dear friend,

really a nice work. i m in learning phase so i m not able to answer your query. but i would like to know something more about this project.

if you complete it than please give me some guidance.

thanking you.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top