BASCOM és az újabb ATMEL processzorok
BASCOM és az újabb ATMEL processzorok
Nekem az 1.11.9.1 BASCOM van meg,
a kérdés az hogy hogy lehet frissíteni, ugyanis nem tudok az újabb procikkal mit kezdeni mert nincs a könyvtárában.
Pl ATMEGA1284, ATMEGA328.
a kérdés az hogy hogy lehet frissíteni, ugyanis nem tudok az újabb procikkal mit kezdeni mert nincs a könyvtárában.
Pl ATMEGA1284, ATMEGA328.
Bascom-AVR-ből a 2.0.5.0 DEMO érhető el a www.mcselec.com oldalon. A regisztrált verzió most a 2.0.7.0 (79 EUR).
OK értem csak a megvásárolt régit hogy lehet frissíteni?Robert írta:Bascom-AVR-ből a 2.0.5.0 DEMO érhető el a www.mcselec.com oldalon. A regisztrált verzió most a 2.0.7.0 (79 EUR).
A,www.mcselec.com -> Updates (baloldali menu)
Itt belépsz a jeszavaddal, felhnévvel amivel megvetted.
És innen letöltöd. Telepíted. Majd a vásárláskor kapott kulcsot bemásolod a Bascom-AVR könyvtárba.
B, UpdateWiz elindít. megmondja hogy mod van jelenleg. És felkínálja a frissítést és letölti.
Fontos!
A régi Bascomról csinálj mentést ne 1:1 felülírd!
Az updateWiz csinál egy ZIP állományt a c:/ alá.
Itt belépsz a jeszavaddal, felhnévvel amivel megvetted.
És innen letöltöd. Telepíted. Majd a vásárláskor kapott kulcsot bemásolod a Bascom-AVR könyvtárba.
B, UpdateWiz elindít. megmondja hogy mod van jelenleg. És felkínálja a frissítést és letölti.
Fontos!
A régi Bascomról csinálj mentést ne 1:1 felülírd!
Az updateWiz csinál egy ZIP állományt a c:/ alá.
Köszi!
Letöltöttem de van egy progim ami nem fordítódik le jól az újabb verzióval.
Itt a hibakódok:
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2357]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2360]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [F10VERX [ 2265]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FP2SRAM [ 2289]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_AC1TOAC2 [ 2286]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2174]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FP2SRAM [ 2293]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2181]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2126]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_AC1TOAC2 [ 2305]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2398]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FDIV [ 2282]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FP2SRAM [ 2316]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2404]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2206]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2146]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FSRAMA2 [ 2412]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2215]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2163]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_MINRES [ 2264]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2435]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_MAXRES [ 2277]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2184]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FP2SRAM [ 2368]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2256]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FP2SRAM [ 2410]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_LONG2FLOAT [ 2475]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2312]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FSRAMA2 [ 2512]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2250]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2521]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2524]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_UNPACK [ 2524]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_MINRES [ 2368]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_REPACK [ 2538]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FCMP [ 2200]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2312]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2313]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FSRAMA2 [ 2578]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2381]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2586]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2387]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2592]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2605]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FADDP5 [ 2345]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas

Letöltöttem de van egy progim ami nem fordítódik le jól az újabb verzióval.
Itt a hibakódok:
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2357]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2360]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [F10VERX [ 2265]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FP2SRAM [ 2289]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_AC1TOAC2 [ 2286]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2174]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FP2SRAM [ 2293]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2181]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2126]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_AC1TOAC2 [ 2305]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2398]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FDIV [ 2282]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FP2SRAM [ 2316]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2404]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2206]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2146]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FSRAMA2 [ 2412]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2215]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2163]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_MINRES [ 2264]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2435]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_MAXRES [ 2277]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2184]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FP2SRAM [ 2368]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2256]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FP2SRAM [ 2410]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_LONG2FLOAT [ 2475]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2312]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FSRAMA2 [ 2512]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2250]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2521]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2524]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_UNPACK [ 2524]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_MINRES [ 2368]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_REPACK [ 2538]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FCMP [ 2200]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2312]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FPADD [ 2313]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FSRAMA2 [ 2578]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2381]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2586]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FPMUL [ 2387]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2592]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [_FSRAMA1 [ 2605]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2017 Backward jump out of range [FADDP5 [ 2345]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Van benne sinus, cosinus, tangens, log rendesen.
Nincs nagy baj mert a régi verzióval jó, csak most 2 bascom-ot kell használni.
Nincs nagy baj mert a régi verzióval jó, csak most 2 bascom-ot kell használni.
Kód: Egész kijelölése
$regfile = "m128def.dat"
$crystal = 16000000
$framesize = 320
$hwstack = 160
$swstack = 160
$baud1 = 4800
$baud = 4800
Config Portd.7 = Output
Config Portd.6 = Output
Config Sda = Portd.1
Config Scl = Portd.0
Ddre.2 = 0
Porte.2 = 1
Ddre.3 = 0
Porte.3 = 1
Config Portb.4 = Output
Cs Alias Porta.0
Da Alias Porta.1
Cl Alias Porta.2
Di Alias Pina.3
Res Alias Porta.5
Los Alias Pina.4
Button Alias Pine.3
Recbutton Alias Pine.2
Config Cs = Output
Config Da = Output
Config Cl = Output
Config Res = Output
Config Portd.4 = Output
Ddra.3 = 0
Porta.3 = 1
Ddra.4 = 0
Porta.4 = 1
Ddre.3 = 0
Porte.3 = 1
Ddre.2 = 0
Porte.2 = 1
Config Portb.6 = Input
Config Portb.7 = Input
Csad Alias Portc.0
Clad Alias Portc.2
Diad Alias Pinc.1
Config Csad = Output
Config Clad = Output
Portc.1 = 1
Ddrc.1 = 0
Config Portd.5 = Output
Declare Sub Sendcom(byval Adre As Byte , Byval Dat As Byte)
Declare Sub Putchar(byval Char As Byte , Byval Xo As Byte , Byval Yo As Byte)
Declare Sub Writecustomcharacter
Config Adc = Single , Prescaler = Auto , Reference = Avcc
Open "COM2:" For Binary As #1
On Urxc1 Gpsdata
Start Adc
I2cinit
Reset Portd.4
Reset Res
Waitms 10
Set Portd.4
Set Portd.6
Set Res
Waitms 100
Reset Portd.4
Reset Portd.6
Dim Gps As Byte , X As Byte , Y As Byte
Dim D(80) As Byte , D1(80) As Byte
Dim Bt As Bit , Bt1 As Bit
Dim Latt As Byte , Late As Byte , Latpt As Byte , Latpe As Byte
Dim Latpetd As Single , Latpesd As Single , Latpeed As Single , Latpefd As Single
Dim Latp As Single , Lat As Double , Lats As Single
Dim Latpet As Byte , Latpes As Byte , Latpee As Byte , Latpef As Byte
Dim Lont As Byte , Lone As Byte , Lonpt As Byte , Lonpe As Byte
Dim Lonpetd As Single , Lonpesd As Single , Lonpeed As Single , Lonpefd As Single
Dim Lonp As Single , Lon As Double , Lons As Single , Lonh As Byte
Dim Lonpet As Byte , Lonpes As Byte , Lonpee As Byte , Lonpef As Byte
Dim Speedh As Word , Speedt As Word , Speede As Word , Speedti As Word
Dim Speedtis As Single , Speeds As Single , Speed As Long
Dim Coursh As Word , Courst As Word , Course As Word , Coursti As Word
Dim Cours As Word , Coursm As Word , Coursml As Long
Dim Alti As Word , Alte As Word , Alth As Word , Altt As Word , Alto As Word , Altet As Word
Dim Alt As Word
Dim Gpssig As Bit
Dim Satt As Byte , Sate As Byte , Sat As Byte
Dim Temp As Byte
Const Pi = 3.14159265358979
Const Mpi = Pi / 180
Const Radiusearth = 6371000
Dim Calc_distance As Double
Dim Calc_course_d As Double
Dim Latref As Double
Dim Lonref As Double
Dim Lathome As Double
Dim Lonhome As Double
Dim Latway1 As Double
Dim Lonway1 As Double
Dim Latway2 As Double
Dim Lonway2 As Double
Dim Calc_distancel As Long
Dim Calc_course_l As Long
Dim Degback As Integer
Dim Osdon As Bit , Teldisp As Byte , Navdisp As Byte
Dim Hour As Byte , Minute As Byte , Secund As Byte
Dim Hourt As Byte , Houre As Byte
Dim Minutet As Byte , Minutee As Byte
Dim Secundt As Byte , Secunde As Byte
Dim Calc_distancel4 As Word , Calc_distancel3 As Word , Calc_distancel2 As Word , Calc_distancel1 As Word , Calc_distancel0 As Word
Dim Calc_distancel4m As Word , Calc_distancel3m As Word , Calc_distancel2m As Word
Dim Speed2m As Word , Speed2 As Word , Speed1 As Word , Speed0 As Word
Dim Altg4 As Word , Altg3 As Word , Altg2 As Word , Altg1 As Word , Altg0 As Word
Dim Altg4m As Word , Altg3m As Word , Altg2m As Word
Dim Altref As Word , Altgps As Word , Altg As Word
Dim Satten As Byte , Satone As Byte
Dim An3 As Word , An2 As Word , An0 As Word , An4 As Word , An1 As Word
Dim Alt4 As Word , Alt3 As Word , Alt2 As Word , Alt1 As Word , Alt0 As Word
Dim Alt4m As Word , Alt3m As Word , Alt2m As Word
Dim Fpa As Single , Tempk As Single , Tempref As Single , Tm1 As Single
Dim Tm As Single , Altrlog As Single , Altrefbar As Single , Fpalog As Single
Dim Prlog As Single , Altbartemp As Single , Altbar As Single
Dim Ch4 As Word
Dim Bar As Single , Barl As Long , Nalt As Bit
Dim Altl As Long
Dim Barl4 As Word , Barl3 As Word , Barl2 As Word , Barl1 As Word , Barl0 As Word
Dim Barl4m As Word , Barl3m As Word , Barl2m As Word
Dim Ip As Word
Dim I0 As Single
Dim I1 As Single
Dim I2 As Single
Dim I3 As Long
Dim I4 As Long
Dim I5 As Long
Dim Il As Long
Dim I3th As Word
Dim I3thm As Word
Dim I3h As Word
Dim I3hm As Word
Dim I3t As Word
Dim I3e As Word
Dim I3hmh As Word
Dim Tempc As Integer
Dim Altsig As Bit
Dim U As Word , Um As Word
Dim Uh As Word , Ut As Word , Ue As Word , Uhtemp As Word
Dim Uhm As Word , Utm As Word , Uem As Word , Uhtempm As Word
Dim Ih As Word , It As Word , Ie As Word , Ihtemp As Word
Dim Rssi As Byte , Rssit As Byte , Rssie As Byte
Dim Rtime As Byte
Dim T2h As Byte , T2l As Byte
Dim T2ht As Byte , T2he As Byte
Dim T3h As Byte , T3l As Byte
Dim T3ht As Byte , T3he As Byte
Dim T4h As Byte , T4l As Byte
Dim T4ht As Byte , T4he As Byte
Dim Lm75read4 As Byte
Dim T2pol As Bit , T3pol As Bit , T4pol As Bit
Dim Rec As Byte
Dim Ppm As Byte , Ppm1 As Byte , Ppm2 As Byte
Dim Calc_course_b As Word
Dim J1n As Byte , J2n As Byte
Dim Knot As Long , Knott As Word , Knote As Word , Jn As Byte
Dim Altgpse As Word , Altgpst As Word , Altgpsh As Word , Altgpsth As Word
Dim Cheks As Byte
Dim K As Byte
Dim Waypoint As Byte
Dim Latway1deg As Byte
Dim Latway1min As Byte
Dim Latway1sec As Byte
Dim Lonway1deg As Byte
Dim Lonway1min As Byte
Dim Lonway1sec As Byte
Dim Latway2deg As Byte
Dim Latway2min As Byte
Dim Latway2sec As Byte
Dim Lonway2deg As Byte
Dim Lonway2min As Byte
Dim Lonway2sec As Byte
Dim Latway1degd As Single
Dim Latway1mind As Single
Dim Latway1secd As Single
Dim Lonway1degd As Single
Dim Lonway1mind As Single
Dim Lonway1secd As Single
Dim Latway2degd As Single
Dim Latway2mind As Single
Dim Latway2secd As Single
Dim Lonway2degd As Single
Dim Lonway2mind As Single
Dim Lonway2secd As Single
Dim Latway1s As Single
Dim Lonway1s As Single
Dim Latway2s As Single
Dim Lonway2s As Single
Dim Syee As Byte
Dim Sy As Byte
Dim Lus As Byte , Place As Byte , Lus1 As Byte , Dat As Byte
Dim Regdata As Byte , W As Bit
Dim I As Byte , J As Byte
Dim Rdata(54) As Byte
Dim Px4 As Byte , Py4 As Byte
Dim Tempdisp As Byte
Dim Koorddisp As Byte
Dim Altbdisp As Byte
Dim Altgdisp As Byte
Dim Px6 As Byte , Py6 As Byte
Dim Px6m As Byte , Py6m As Byte
Dim Px7 As Byte , Py7 As Byte
Dim Pyd As Byte
Dim Pys As Byte
Dim Pysn As Byte , Pysp As Byte
Dim Pyi As Byte
Dim Pyn As Byte
Dim Radarx As Byte , Radary As Byte
Dim Jrc(72) As Byte
Dim Once As Bit
Dim Lon1 As Long
Dim Lat1 As Long
Dim Spd1 As Word
Dim Deg1 As Word
Dim Istart As Byte
Readeeprom Lathome , 0
Readeeprom Lonhome , 16
Readeeprom Tempref , 32
Readeeprom Altrefbar , 48
Readeeprom Altref , 64
Readeeprom Latway1deg , 80
Readeeprom Latway1min , 81
Readeeprom Latway1sec , 82
Readeeprom Lonway1deg , 96
Readeeprom Lonway1min , 97
Readeeprom Lonway1sec , 98
Readeeprom Latway2deg , 112
Readeeprom Latway2min , 113
Readeeprom Latway2sec , 114
Readeeprom Lonway2deg , 128
Readeeprom Lonway2min , 129
Readeeprom Lonway2sec , 130
Readeeprom Syee , 144
Readeeprom Tempdisp , 160
Readeeprom Koorddisp , 161
Readeeprom Altbdisp , 162
Readeeprom Altgdisp , 163
Readeeprom Navdisp , 176
Enable Interrupts
Enable Urxc1
'47 17 54 19 50 20
'2F 11 36 13 32 14 Zsolti
Readeeprom Istart , 160
'(
Readeeprom Igain , 162
Readeeprom Umgain , 176
Readeeprom Uvgain , 178
Readeeprom Rstart , 180
Readeeprom Rstop , 182
')
If Recbutton = 0 Then Waitms 100
If Recbutton = 0 Then
Incr Syee
Writeeeprom Syee , 144
End If
Sy = Syee Mod 2
If Sy = 1 Then Call Sendcom(0 , &B01001010)
If Sy = 0 Then Call Sendcom(0 , &B00001010)
Waitms 10
If Sy = 0 Then Call Sendcom(0 , &B00001000)
If Sy = 1 Then Call Sendcom(0 , &B01001000)
Call Sendcom(1 , &B00000010)
Call Sendcom(2 , &B00100100)
Call Sendcom(3 , &B00010011)
'If Button = 0 Then Call Sendcom(4 , &B00001000)
'If Button = 1 Then Call Sendcom(4 , &B00000000)
Call Sendcom(4 , &B00000000)
If Recbutton = 0 And Button = 0 Then Waitms 100
If Recbutton = 0 And Button = 0 Then Goto Writecar
If Button = 0 Then Waitms 100
If Button = 0 Then
Incr Navdisp
If Navdisp > 1 Then Navdisp = 0
Writeeeprom Navdisp , 176
End If
Rec = 0
Waypoint = 0
Lm75read4 = &B10011111
'Degback = 180
Declare Sub Get_distance_course(byval Lat As Double , Byval Lon As Double , Byval Latref As Double , Byval Lonref As Double)
'Lonref = 19.847414015 'itthon
'Latref = 47.296817777
'Altref = 120
Waitms 100
'*************************MMC212x*******************************************
I2cstart 'start condition
I2cwbyte &B01100000 'slave address
I2cwbyte 0
I2cwbyte &B00000100
I2cstop
Waitms 100
I2cstart 'start condition
I2cwbyte &B01100000 'slave address
I2cwbyte 0
I2cwbyte &B00000010
I2cstop
Const Xmax = 2085
Const Xmin = 1872
Const Ymax = 2287
Const Ymin = 2070
Dim Mxsens As Single , Mysens As Single
Dim Mxoffs As Single , Myoffs As Single
Dim Xm As Single , Ym As Single
Dim Zm As Single , Grad As Single
Dim Lsbx As Byte , Msbx As Byte , Lsby As Byte , Msby As Byte
Dim Mx As Word , My As Word
Mxsens = Xmax - Xmin
Mxsens = Mxsens / 2
Mysens = Ymax - Ymin
Mysens = Mysens / 2
Mxoffs = Xmax + Xmin
Mxoffs = Mxoffs / 2
Myoffs = Ymax + Ymin
Myoffs = Myoffs / 2
Latway1degd = Latway1deg
Latway1mind = Latway1min / 60 '0.98333333
Latway1secd = Latway1sec / 3600 '0.01638888
Latway2degd = Latway2deg
Latway2mind = Latway2min / 60
Latway2secd = Latway2sec / 3600
Lonway1degd = Lonway1deg
Lonway1mind = Lonway1min / 60
Lonway1secd = Lonway1sec / 3600
Lonway2degd = Lonway2deg
Lonway2mind = Lonway2min / 60
Lonway2secd = Lonway2sec / 3600
Latway1s = Latway1degd
Latway1s = Latway1s + Latway1mind
Latway1s = Latway1s + Latway1secd
Latway2s = Latway2degd
Latway2s = Latway2s + Latway2mind
Latway2s = Latway2s + Latway2secd
Lonway1s = Lonway1degd
Lonway1s = Lonway1s + Lonway1mind
Lonway1s = Lonway1s + Lonway1secd
Lonway2s = Lonway2degd
Lonway2s = Lonway2s + Lonway2mind
Lonway2s = Lonway2s + Lonway2secd
Latway1 = Latway1s
Lonway1 = Lonway1s
Latway2 = Latway2s
Lonway2 = Lonway2s
Do
If Jrc(k) = &HF0 Then
If Once = 0 Then
Once = 1
Set Portd.6
Lon1.0 = Jrc(9).0 : Lon1.1 = Jrc(9).1 : Lon1.2 = Jrc(9).2 : Lon1.3 = Jrc(9).3
Lon1.4 = Jrc(9).4 : Lon1.5 = Jrc(9).5 : Lon1.6 = Jrc(9).6 : Lon1.7 = Jrc(8).0
Lon1.8 = Jrc(8).1 : Lon1.9 = Jrc(8).2 : Lon1.10 = Jrc(8).3 : Lon1.11 = Jrc(8).4
Lon1.12 = Jrc(8).5 : Lon1.13 = Jrc(8).6 : Lon1.14 = Jrc(7).0 : Lon1.15 = Jrc(7).1
Lon1.16 = Jrc(7).2 : Lon1.17 = Jrc(7).3 : Lon1.18 = Jrc(7).4 : Lon1.19 = Jrc(7).5
Lon1.20 = Jrc(7).6 : Lon1.21 = Jrc(6).0 : Lon1.22 = Jrc(6).1 : Lon1.23 = Jrc(6).2
Lon1.24 = Jrc(6).3 : Lon1.25 = Jrc(6).4 : Lon1.26 = Jrc(6).5 : Lon1.27 = Jrc(6).6
Lon1.28 = 0 : Lon1.29 = 0 : Lon1.30 = 0 : Lon1.31 = 0
Lat1.0 = Jrc(5).0 : Lat1.1 = Jrc(5).1 : Lat1.2 = Jrc(5).2 : Lat1.3 = Jrc(5).3
Lat1.4 = Jrc(5).4 : Lat1.5 = Jrc(5).5 : Lat1.6 = Jrc(5).6 : Lat1.7 = Jrc(4).0
Lat1.8 = Jrc(4).1 : Lat1.9 = Jrc(4).2 : Lat1.10 = Jrc(4).3 : Lat1.11 = Jrc(4).4
Lat1.12 = Jrc(4).5 : Lat1.13 = Jrc(4).6 : Lat1.14 = Jrc(3).0 : Lat1.15 = Jrc(3).1
Lat1.16 = Jrc(3).2 : Lat1.17 = Jrc(3).3 : Lat1.18 = Jrc(3).4 : Lat1.19 = Jrc(3).5
Lat1.20 = Jrc(3).6 : Lat1.21 = Jrc(2).0 : Lat1.22 = Jrc(2).1 : Lat1.23 = Jrc(2).2
Lat1.24 = Jrc(2).3 : Lat1.25 = Jrc(2).4 : Lat1.26 = Jrc(2).5 : Lat1.27 = Jrc(2).6
Lat1.28 = 0 : Lat1.29 = 0 : Lat1.30 = 0 : Lat1.31 = 0
Alt1.0 = Jrc(11).0 : Alt1.1 = Jrc(11).1 : Alt1.2 = Jrc(11).2 : Alt1.3 = Jrc(11).3
Alt1.4 = Jrc(11).4 : Alt1.5 = Jrc(11).5 : Alt1.6 = Jrc(11).6 : Alt1.7 = Jrc(10).0
Alt1.8 = Jrc(10).1 : Alt1.9 = Jrc(10).2 : Alt1.10 = Jrc(10).3 : Alt1.11 = Jrc(10).4
Alt1.12 = Jrc(10).5 : Alt1.13 = Jrc(10).6 : Alt1.14 = 0 : Alt1.15 = 0
Spd1.0 = Jrc(13).0 : Spd1.1 = Jrc(13).1 : Spd1.2 = Jrc(13).2 : Spd1.3 = Jrc(13).3
Spd1.4 = Jrc(13).4 : Spd1.5 = Jrc(13).5 : Spd1.6 = Jrc(13).6 : Spd1.7 = Jrc(12).0
Spd1.8 = Jrc(12).1 : Spd1.9 = Jrc(12).2 : Spd1.10 = Jrc(12).3 : Spd1.11 = Jrc(12).4
Spd1.12 = Jrc(12).5 : Spd1.13 = Jrc(12).6 : Spd1.14 = 0 : Spd1.15 = 0
Deg1.0 = Jrc(15).0 : Deg1.1 = Jrc(15).1 : Deg1.2 = Jrc(15).2 : Deg1.3 = Jrc(15).3
Deg1.4 = Jrc(15).4 : Deg1.5 = Jrc(15).5 : Deg1.6 = Jrc(15).6 : Deg1.7 = Jrc(14).0
Deg1.8 = Jrc(14).1 : Deg1.9 = Jrc(14).2 : Deg1.10 = Jrc(14).3 : Deg1.11 = Jrc(14).4
Deg1.12 = Jrc(14).5 : Deg1.13 = Jrc(14).6 : Deg1.14 = 0 : Deg1.15 = 0
If Jrc(1) < &H50 Then
Gpssig = 1
Else
Gpssig = 0
End If
Altgps = Alt1
Speed = Spd1 / 10
Deg1 = Deg1 / 10
Cours = 360 - Deg1
Cours = Cours + 90
If Cours > 359 Then Cours = Cours - 360
Lats = Lat1 / 60
Lats = Lats * 0.001
Lat = Lats
Lons = Lon1 / 60
Lons = Lons * 0.001
Lon = Lons
If Pinb.6 = 1 Then
Ppm1 = 2
Else
Ppm1 = 0
End If
If Pinb.7 = 1 Then
Ppm2 = 1
Else
Ppm2 = 0
End If
Ppm = Ppm1 + Ppm2
Ppm = 1
If Ppm = 0 Then
Latref = Lathome
Lonref = Lonhome
End If
If Ppm = 1 Then
Latref = Lathome
Lonref = Lonhome
End If
If Ppm = 2 Then
Latref = Latway1
Lonref = Lonway1
End If
If Ppm = 3 Then
Latref = Latway2
Lonref = Lonway2
End If
Reset Portd.6
'*************************MMC212x*******************************************
I2cstart 'start condition
I2cwbyte &B01100000 'slave address
I2cwbyte 0
I2cwbyte 1
I2cstop
Waitms 10
I2cstart 'repeated start
I2cwbyte &B01100001 'slave address (read)
I2crbyte Lsbx , Ack
I2crbyte Msbx , Ack
I2crbyte Lsby , Ack
I2crbyte Msby , Nack 'read byte
I2cstop
Mx = Makeint(msbx , Lsbx)
My = Makeint(msby , Lsby)
If Mx > Xmax Then Mx = Xmax
If Mx < Xmin Then Mx = Xmin
If My > Ymax Then My = Ymax
If My < Ymin Then My = Ymin
Xm = Mx - Mxoffs
Xm = Xm / Mxsens
Ym = My - Myoffs
Ym = Ym / Mysens
Zm = Ym / Xm
Grad = Atn(zm)
Grad = Rad2deg(grad)
Grad = Round(grad)
If Ym >= 0 And Xm >= 0 Then Grad = Grad
If Ym >= 0 And Xm < 0 Then Grad = 180 + Grad
If Ym < 0 And Xm < 0 Then Grad = 180 + Grad
If Ym < 0 And Xm >= 0 Then Grad = 360 + Grad
If Grad >= 360 Then Grad = 0
Coursml = Grad
Coursm = Coursml
Barl = Coursm
If Speed <= 5 Then Cours = Coursm
'If Gpssig = 1 Then
Call Get_distance_course(latref , Lonref , Lat , Lon)
'End If
Degback = Calc_course_l - Cours
If Degback < 0 Then Degback = 360 + Degback
Calc_course_b = 180 + Calc_course_l
If Calc_course_b >= 360 Then Calc_course_b = Calc_course_b - 360
If Altgps >= Altref Then
Altg = Altgps - Altref
Altsig = 0 '+
End If
If Altgps < Altref Then
Altg = Altref - Altgps
Altsig = 1 '-
End If
Altg4 = Altg / 10000
Altg4m = Altg Mod 10000
Altg3 = Altg4m / 1000
Altg3m = Altg4m Mod 1000
Altg2 = Altg3m / 100
Altg2m = Altg3m Mod 100
Altg1 = Altg2m / 10
Altg0 = Altg2m Mod 10
Calc_distancel4 = Calc_distancel / 10000
Calc_distancel4m = Calc_distancel Mod 10000
Calc_distancel3 = Calc_distancel4m / 1000
Calc_distancel3m = Calc_distancel4m Mod 1000
Calc_distancel2 = Calc_distancel3m / 100
Calc_distancel2m = Calc_distancel3m Mod 100
Calc_distancel1 = Calc_distancel2m / 10
Calc_distancel0 = Calc_distancel2m Mod 10
Speed2 = Speed / 100
Speed2m = Speed Mod 100
Speed1 = Speed2m / 10
Speed0 = Speed2m Mod 10
'******************************LM75**********************************
I2cstart
I2cwbyte Lm75read4
I2crbyte T4h , Ack
I2crbyte T4l , Nack
I2cstop
T4pol = T4h.7
T4h = T4h And &B01111111
If T4pol = 0 Then
Temp = 0
T4h = T4h
Else
Temp = &H49
T4h = 128 - T4h
End If
T4ht = T4h / 10
T4he = T4h Mod 10
Tempc = T4h
If T4pol = 1 Then Tempc = Tempc * -1
Tempk = Tempc + 273
'*****************************ADC121S021************************************
Reset Csad
Shiftin Diad , Clad , Ch4 , 1 , 16
Ch4 = Ch4 And &B0000111111111111
Set Csad
'****************************MPX4115****************************************
Bar = Ch4
Bar = Ch4 / 4095
Bar = Bar + 0.095
Bar = Bar / 0.0009
'Barl = Bar
Barl4 = Barl / 10000
Barl4m = Barl Mod 10000
Barl3 = Barl4m / 1000
Barl3m = Barl4m Mod 1000
Barl2 = Barl3m / 100
Barl2m = Barl3m Mod 100
Barl1 = Barl2m / 10
Barl0 = Barl2m Mod 10
Fpa = Bar * 100 '10555
Tm1 = Tempk + Tempref
Tm = Tm1 / 2 '300
Altrlog = Log10(altrefbar) '4.9956351945
Fpalog = Log10(fpa) '4.0234582376
Prlog = Altrlog - Fpalog '0.9721769569
Altbartemp = 67.34 * Tm '20202
Altbar = Altbartemp * Prlog '18181
Altbar = Round(altbar)
If Altbar >= 0 Then
Nalt = 0 '+
Else
Nalt = 1 '-
End If
Altbar = Abs(altbar)
Altl = Altbar
Alt = Altl
Alt4 = Alt / 10000 '1
Alt4m = Alt Mod 10000 '2345
Alt3 = Alt4m / 1000 '2
Alt3m = Alt4m Mod 1000 '345
Alt2 = Alt3m / 100 '3
Alt2m = Alt3m Mod 100 '45
Alt1 = Alt2m / 10 '4
Alt0 = Alt2m Mod 10
An0 = Getadc(0) 'U
Waitus 50
An1 = Getadc(1) 'U
Waitus 50
An2 = Getadc(2) 'i
'Waitus 50
'An3 = Getadc(3)
Waitus 50
An4 = Getadc(4)
'20 650mV 4.97V
'If An4 < 92 Then An4 = 92
'If An4 > 155 Then An4 = 155
'An4 = An4 - 92
Rssi = An4
If Rssi > 99 Then Rssi = 99
Rssit = Rssi / 10
Rssie = Rssi Mod 10
If An2 >= Istart Then
Ip = An2 - Istart
'61
Else
Ip = 0
End If
I0 = Ip * 2
'i0 = 100*I(A) = I0x10 = mA
I1 = I0 / 36 '36x1
I2 = I2 + I1
I3 = I2
Il = I0
Ih = Il / 100
Ihtemp = Il Mod 100
It = Ihtemp / 10
Ie = Ihtemp Mod 10
I3th = I3 / 1000
I3thm = I3 Mod 1000
I3h = I3thm / 100
I3hmh = I3thm Mod 100
I3t = I3hmh / 10
I3e = I3hmh Mod 10
U = An0 * 18
U = U / 110
U = U + 12
Uh = U / 100
Uhtemp = U Mod 100
Ut = Uhtemp / 10
Ue = Uhtemp Mod 10
Um = An1 * 12
Um = Um / 98
Uhm = Um / 100
Uhtempm = Um Mod 100
Utm = Uhtempm / 10
Uem = Uhtempm Mod 10
Sat = Jrc(30)
If Sat > 15 Then Sat = 0
Satten = Sat / 10
Satone = Sat Mod 10
Incr Secund
If Secund >= 60 Then
Secund = 0
Incr Minute
End If
If Minute >= 99 Then
Minute = 0
'Incr Hour
End If
'Hourt = Hour / 10
'Houre = Hour Mod 10
Minutet = Minute / 10
Minutee = Minute Mod 10
Secundt = Secund / 10
Secunde = Secund Mod 10
'If Rtime <> 0 And Gpssig = 1 Then
If Gpssig = 1 Then Set Portd.6
'End If
'++++++++++++++++++++++++++++++++group1++++++++++++++++++++++++++++++++++++++++
'(
If Tempdisp = 255 Then
Px4 = 1
If Sy = 0 Then Py4 = 13
If Sy = 1 Then Py4 = 15
Temp = &H50
Call Putchar(temp , Px4 , Py4)
Temp = T4ht
Incr Px4
Call Putchar(temp , Px4 , Py4)
Temp = T4he
If Temp = 0 Then Temp = 10
Incr Px4
Call Putchar(temp , Px4 , Py4)
Temp = &H51
Incr Px4 'C
Call Putchar(temp , Px4 , Py4)
End If
')
'++++++++++++++++++++++++++++++++group2++++++++++++++++++++++++++++++++++++++++
'(
Px6 = 1 : Py6 = 1
Temp = &H52 'V
Call Putchar(temp , Px6 , Py6)
Temp = Uh
'If Temp = 0 Then Temp = 10
Incr Px6
Call Putchar(temp , Px6 , Py6)
Temp = Ut
If Temp = 0 Then Temp = 10
Incr Px6
Call Putchar(temp , Px6 , Py6)
Temp = &H41
Incr Px6 '.
Call Putchar(temp , Px6 , Py6)
Temp = Ue
If Temp = 0 Then Temp = 10
Incr Px6
Call Putchar(temp , Px6 , Py6)
Temp = &H9E
Incr Px6 'V
Call Putchar(temp , Px6 , Py6)
')
'++++++++++++++++++++++++++++++++group3++++++++++++++++++++++++++++++++++++++++
Px6m = 8 : Py6m = 1
Temp = &H53 'M
Call Putchar(temp , Px6m , Py6m)
Temp = Uhm
'If Temp = 0 Then Temp = 10
Incr Px6m
Call Putchar(temp , Px6m , Py6m)
Temp = Utm
If Temp = 0 Then Temp = 10
Incr Px6m
Call Putchar(temp , Px6m , Py6m)
Temp = &H41
Incr Px6m '.
Call Putchar(temp , Px6m , Py6m)
Temp = Uem
If Temp = 0 Then Temp = 10
Incr Px6m
Call Putchar(temp , Px6m , Py6m)
Temp = &H9E
Incr Px6m 'V
Call Putchar(temp , Px6m , Py6m)
'++++++++++++++++++++++++++++++++++group4++++++++++++++++++++++++++++++++++++++
Px7 = 15 : Py7 = 1
Temp = Ih
Call Putchar(temp , Px7 , Py7)
Temp = It
If Temp = 0 Then Temp = 10
Incr Px7
Call Putchar(temp , Px7 , Py7)
Temp = &H41
Incr Px7 '.
Call Putchar(temp , Px7 , Py7)
Temp = Ie
Incr Px7
If Temp = 0 Then Temp = 10
Call Putchar(temp , Px7 , Py7)
Temp = &H9F
Incr Px7 'A
Call Putchar(temp , Px7 , Py7)
'+++++++++++++++++++++++++++++++++group5++++++++++++++++++++++++++++++++++++++++
Temp = I3th
'If Temp = 0 Then Temp = 10
Call Putchar(temp , 21 , 1)
Temp = I3h
If Temp = 0 Then Temp = 10
Call Putchar(temp , 22 , 1)
Temp = I3t
If Temp = 0 Then Temp = 10
Call Putchar(temp , 23 , 1)
Temp = I3e
If Temp = 0 Then Temp = 10
Call Putchar(temp , 24 , 1)
Temp = &HB5 'mAh
Call Putchar(temp , 25 , 1)
'---------------------------------------------------------------------------
'*************************IF NMEA183 GPS USED*****************************
'lat
'(
If Koorddisp = 255 Then
If Gpssig = 1 Then
Temp = D(14)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 1 , 2)
Temp = D(15)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 2 , 2)
Temp = &HD0
Call Putchar(temp , 3 , 2)
Temp = D(16)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 4 , 2)
Temp = D(17)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 5 , 2)
Temp = &H41
Call Putchar(temp , 6 , 2)
Temp = D(19)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 7 , 2)
Temp = D(20)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 8 , 2)
Temp = &H46
Call Putchar(temp , 9 , 2)
'lon
Temp = D(27)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 12 , 2)
Temp = D(28)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 13 , 2)
Temp = &HD0
Call Putchar(temp , 14 , 2)
Temp = D(29)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 15 , 2)
Temp = D(30)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 16 , 2)
Temp = &H41
Call Putchar(temp , 17 , 2)
Temp = D(32)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 18 , 2)
Temp = D(33)
Temp = Temp - 48
If Temp = 0 Then Temp = 10
Call Putchar(temp , 19 , 2)
Temp = &H46
Call Putchar(temp , 20 , 2)
Else
Temp = &H49
Call Putchar(temp , 1 , 2)
Call Putchar(temp , 2 , 2)
Temp = &HD0
Call Putchar(temp , 3 , 2)
Temp = &H49
Call Putchar(temp , 4 , 2)
Call Putchar(temp , 5 , 2)
Temp = &H0
Call Putchar(temp , 6 , 2)
Temp = &H49
Call Putchar(temp , 7 , 2)
Call Putchar(temp , 8 , 2)
Temp = &H46
Call Putchar(temp , 9 , 2)
Temp = &H49
Call Putchar(temp , 12 , 2)
Call Putchar(temp , 13 , 2)
Temp = &HD0
Call Putchar(temp , 14 , 2)
Temp = &H49
Call Putchar(temp , 15 , 2)
Call Putchar(temp , 16 , 2)
Temp = &H41
Call Putchar(temp , 17 , 2)
Temp = &H49
Call Putchar(temp , 18 , 2)
Call Putchar(temp , 19 , 2)
Temp = &H46
Call Putchar(temp , 20 , 2)
End If
End If
')
'+++++++++++++++++++++++++++++++++++group6++++++++++++++++++++++++++++++++++++
If Altgdisp = 255 Then
Temp = &H87 'altg
Call Putchar(temp , 1 , 3)
If Altsig = 0 Then Temp = 0
If Altsig = 1 Then Temp = &H49
Call Putchar(temp , 2 , 3)
'Temp = Altg4
'If Temp = 0 Then Temp = 10
'Call Putchar(temp , 3 , 3)
Temp = Altg3
'If Temp = 0 Then Temp = 10
Call Putchar(temp , 3 , 3)
Temp = Altg2
If Temp = 0 Then Temp = 10
Call Putchar(temp , 4 , 3)
Temp = Altg1
If Temp = 0 Then Temp = 10
Call Putchar(temp , 5 , 3)
Temp = Altg0
If Temp = 0 Then Temp = 10
Call Putchar(temp , 6 , 3)
Temp = &H8C 'm
Call Putchar(temp , 7 , 3)
End If
'+++++++++++++++++++++++++++++++++++droup7++++++++++++++++++++++++++++++++++++
'(
If Altbdisp = 255 Then
Temp = &H87 'altB
Call Putchar(temp , 1 , 4)
If Nalt = 1 Then
Temp = &H49
Else
Temp = 0
End If
Call Putchar(temp , 2 , 4)
'Temp = Alt4
'If Temp = 0 Then Temp = 10
'Call Putchar(temp , 3 , 4)
Temp = Alt3
'If Temp = 0 Then Temp = 10
Call Putchar(temp , 3 , 4)
Temp = Alt2
If Temp = 0 Then Temp = 10
Call Putchar(temp , 4 , 4)
Temp = Alt1
If Temp = 0 Then Temp = 10
Call Putchar(temp , 5 , 4)
Temp = Alt0
If Temp = 0 Then Temp = 10
Call Putchar(temp , 6 , 4)
Temp = &H8C
Call Putchar(temp , 7 , 4) 'm
')
'Temp = Barl4
'If Temp = 0 Then Temp = 10
'Call Putchar(temp , 11 , 3)
'Temp = Barl3
'If Temp = 0 Then Temp = 10
'Call Putchar(temp , 12 , 3)
Temp = Barl2
If Temp = 0 Then Temp = 10
Call Putchar(temp , 13 , 3)
Temp = Barl1
If Temp = 0 Then Temp = 10
Call Putchar(temp , 14 , 3)
Temp = Barl0
If Temp = 0 Then Temp = 10
Call Putchar(temp , 15 , 3)
'End If
'+++++++++++++++++++++++++++++++++++++++group8++++++++++++++++++++++++++++++++
If Sy = 0 Then Pyd = 12
If Sy = 1 Then Pyd = 14
Temp = &H89 'Dist
Call Putchar(temp , 11 , Pyd)
Temp = Calc_distancel4
'If Temp = 0 Then Temp = 10
Call Putchar(temp , 12 , Pyd)
Temp = Calc_distancel3
If Temp = 0 Then Temp = 10
Call Putchar(temp , 13 , Pyd)
Temp = Calc_distancel2
If Temp = 0 Then Temp = 10
Call Putchar(temp , 14 , Pyd)
Temp = Calc_distancel1
If Temp = 0 Then Temp = 10
Call Putchar(temp , 15 , Pyd)
Temp = Calc_distancel0
If Temp = 0 Then Temp = 10
Call Putchar(temp , 16 , Pyd)
Temp = &H8C 'm
Call Putchar(temp , 17 , Pyd)
'++++++++++++++++++++++++++++++++++++group9++++++++++++++++++++++++++++++++++
If Sy = 0 Then Pys = 6
If Sy = 1 Then Pys = 8
Pysn = Pys - 1
Pysp = Pys + 1
Temp = Speed2
'If Temp = 0 Then Temp = 10
Call Putchar(temp , 24 , Pys)
Temp = Speed1
If Temp = 0 Then Temp = 10
Call Putchar(temp , 25 , Pys)
Temp = Speed0
If Temp = 0 Then Temp = 10
Call Putchar(temp , 26 , Pys)
Temp = &HCB 'kmh
Call Putchar(temp , 27 , Pys)
'++++++++++++++++++++++++++++++++++++group10++++++++++++++++++++++++++++++++++
If Navdisp <> 1 Then
If Sy = 0 Then Pys = 6
If Sy = 1 Then Pys = 8
If Ppm < 2 Then Temp = &HB4
If Ppm = 2 Then Temp = &H21
If Ppm = 3 Then Temp = &H21 '
Call Putchar(temp , 14 , Pys)
If Ppm < 2 Then Temp = &H0
If Ppm = 2 Then Temp = &H1
If Ppm = 3 Then Temp = &H2 '
Call Putchar(temp , 15 , Pys)
If Cours >= 0 And Cours < 9 Or Cours >= 351 Then Temp = &HA0
If Cours >= 9 And Cours < 27 Then Temp = &HA1
If Cours >= 27 And Cours < 45 Then Temp = &HA2
If Cours >= 45 And Cours < 63 Then Temp = &HA2
If Cours >= 63 And Cours < 81 Then Temp = &HA3
If Cours >= 81 And Cours < 99 Then Temp = &HA4 '!
If Cours >= 99 And Cours < 117 Then Temp = &HA5
If Cours >= 117 And Cours < 135 Then Temp = &HA6
If Cours >= 135 And Cours < 153 Then Temp = &HA6
If Cours >= 153 And Cours < 171 Then Temp = &HA7
If Cours >= 171 And Cours < 189 Then Temp = &HA8 '!
If Cours >= 189 And Cours < 207 Then Temp = &HA9
If Cours >= 207 And Cours < 225 Then Temp = &HAA
If Cours >= 225 And Cours < 243 Then Temp = &HAA
If Cours >= 243 And Cours < 261 Then Temp = &HAB
If Cours >= 261 And Cours < 279 Then Temp = &HAC '!
If Cours >= 279 And Cours < 297 Then Temp = &HAD
If Cours >= 297 And Cours < 315 Then Temp = &HAD
If Cours >= 315 And Cours < 333 Then Temp = &HAE
If Cours >= 333 And Cours < 351 Then Temp = &HAF '!
If Calc_course_b >= 0 And Calc_course_b < 9 Or Calc_course_b >= 351 Then
Radarx = 14
Radary = 5
End If
If Calc_course_b >= 9 And Calc_course_b < 27 Then
Radarx = 15
Radary = 5
End If
If Calc_course_b >= 27 And Calc_course_b < 45 Then
Radarx = 16
Radary = 6
End If
If Calc_course_b >= 45 And Calc_course_b < 63 Then
Radarx = 16
Radary = 6
End If
If Calc_course_b >= 63 And Calc_course_b < 81 Then
Radarx = 17
Radary = 7
End If
If Calc_course_b >= 81 And Calc_course_b < 99 Then
Radarx = 17
Radary = 8
End If
If Calc_course_b >= 99 And Calc_course_b < 117 Then
Radarx = 17
Radary = 9
End If
If Calc_course_b >= 117 And Calc_course_b < 135 Then
Radarx = 16
Radary = 10
End If
If Calc_course_b >= 135 And Calc_course_b < 153 Then
Radarx = 16
Radary = 10
End If
If Calc_course_b >= 153 And Calc_course_b < 171 Then
Radarx = 15
Radary = 11
End If
If Calc_course_b >= 171 And Calc_course_b < 189 Then
Radarx = 14
Radary = 11
End If
If Calc_course_b >= 189 And Calc_course_b < 207 Then
Radarx = 13
Radary = 11
End If
If Calc_course_b >= 207 And Calc_course_b < 225 Then
Radarx = 12
Radary = 10
End If
If Calc_course_b >= 225 And Calc_course_b < 243 Then
Radarx = 12
Radary = 10
End If
If Calc_course_b >= 243 And Calc_course_b < 261 Then
Radarx = 11
Radary = 9
End If
If Calc_course_b >= 261 And Calc_course_b < 279 Then
Radarx = 11
Radary = 8
End If
If Calc_course_b >= 279 And Calc_course_b < 297 Then
Radarx = 11
Radary = 7
End If
If Calc_course_b >= 297 And Calc_course_b < 315 Then
Radarx = 12
Radary = 6
End If
If Calc_course_b >= 315 And Calc_course_b < 333 Then
Radarx = 12
Radary = 6
End If
If Calc_course_b >= 333 And Calc_course_b < 351 Then
Radarx = 13
Radary = 5
End If
If Sy = 0 Then Radary = Radary - 2
Call Putchar(temp , Radarx , Radary)
Temp = 0
If Sy = 0 Then
If Radarx <> 14 Or Radary <> 3 Then Call Putchar(temp , 14 , 3)
If Radarx <> 15 Or Radary <> 3 Then Call Putchar(temp , 15 , 3)
If Radarx <> 16 Or Radary <> 4 Then Call Putchar(temp , 16 , 4)
If Radarx <> 17 Or Radary <> 5 Then Call Putchar(temp , 17 , 5)
If Radarx <> 17 Or Radary <> 6 Then Call Putchar(temp , 17 , 6)
If Radarx <> 17 Or Radary <> 7 Then Call Putchar(temp , 17 , 7)
If Radarx <> 16 Or Radary <> 8 Then Call Putchar(temp , 16 , 8)
If Radarx <> 15 Or Radary <> 9 Then Call Putchar(temp , 15 , 9)
If Radarx <> 14 Or Radary <> 9 Then Call Putchar(temp , 14 , 9)
If Radarx <> 13 Or Radary <> 9 Then Call Putchar(temp , 13 , 9)
If Radarx <> 12 Or Radary <> 8 Then Call Putchar(temp , 12 , 8)
If Radarx <> 11 Or Radary <> 7 Then Call Putchar(temp , 11 , 7)
If Radarx <> 11 Or Radary <> 6 Then Call Putchar(temp , 11 , 6)
If Radarx <> 11 Or Radary <> 5 Then Call Putchar(temp , 11 , 5)
If Radarx <> 12 Or Radary <> 4 Then Call Putchar(temp , 12 , 4)
If Radarx <> 13 Or Radary <> 3 Then Call Putchar(temp , 13 , 3)
Else
If Radarx <> 14 Or Radary <> 5 Then Call Putchar(temp , 14 , 5)
If Radarx <> 15 Or Radary <> 5 Then Call Putchar(temp , 15 , 5)
If Radarx <> 16 Or Radary <> 6 Then Call Putchar(temp , 16 , 6)
If Radarx <> 17 Or Radary <> 7 Then Call Putchar(temp , 17 , 7)
If Radarx <> 17 Or Radary <> 8 Then Call Putchar(temp , 17 , 8)
If Radarx <> 17 Or Radary <> 9 Then Call Putchar(temp , 17 , 9)
If Radarx <> 16 Or Radary <> 10 Then Call Putchar(temp , 16 , 10)
If Radarx <> 15 Or Radary <> 11 Then Call Putchar(temp , 15 , 11)
If Radarx <> 14 Or Radary <> 11 Then Call Putchar(temp , 14 , 11)
If Radarx <> 13 Or Radary <> 11 Then Call Putchar(temp , 13 , 11)
If Radarx <> 12 Or Radary <> 10 Then Call Putchar(temp , 12 , 10)
If Radarx <> 11 Or Radary <> 9 Then Call Putchar(temp , 11 , 9)
If Radarx <> 11 Or Radary <> 8 Then Call Putchar(temp , 11 , 8)
If Radarx <> 11 Or Radary <> 7 Then Call Putchar(temp , 11 , 7)
If Radarx <> 12 Or Radary <> 6 Then Call Putchar(temp , 12 , 6)
If Radarx <> 13 Or Radary <> 5 Then Call Putchar(temp , 13 , 5)
End If
'14,5 15,5 16,6 17,7 17,8 17,9 16,10 15,11 14,11 13,11 12,10 11,9 11,8 11,7 12,6 13,5
End If
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If Navdisp = 1 Then
Temp = &H54 '
Call Putchar(temp , 14 , Pys)
If Ppm < 2 Then
Temp = 0
End If
If Ppm = 2 Then
Temp = 1
End If
If Ppm = 3 Then
Temp = 2
End If
Call Putchar(temp , 15 , Pys)
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 0 And Degback < 9 Or Degback >= 351 Then
Call Putchar(temp , 14 , Pysn)
Else
Temp = 0
Call Putchar(temp , 14 , Pysn)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 9 And Degback < 27 Then
Call Putchar(temp , 15 , Pysn)
Else
Temp = 0
Call Putchar(temp , 15 , Pysn)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 27 And Degback < 45 Then
Call Putchar(temp , 16 , Pysn)
Else
Temp = 0
Call Putchar(temp , 16 , Pysn)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 45 And Degback < 63 Then
Call Putchar(temp , 17 , Pysn)
Else
Temp = 0
Call Putchar(temp , 17 , Pysn)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 63 And Degback < 81 Then
Call Putchar(temp , 18 , Pysn)
Else
Temp = 0
Call Putchar(temp , 18 , Pysn)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 81 And Degback < 99 Then
Call Putchar(temp , 18 , Pys)
Else
Temp = 0
Call Putchar(temp , 18 , Pys)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 99 And Degback < 117 Then
Call Putchar(temp , 18 , Pysp)
Else
Temp = 0
Call Putchar(temp , 18 , Pysp)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 117 And Degback < 135 Then
Call Putchar(temp , 17 , Pysp)
Else
Temp = 0
Call Putchar(temp , 17 , Pysp)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 135 And Degback < 153 Then
Call Putchar(temp , 16 , Pysp)
Else
Temp = 0
Call Putchar(temp , 16 , Pysp)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 153 And Degback < 171 Then
Call Putchar(temp , 15 , Pysp)
Else
Temp = 0
Call Putchar(temp , 15 , Pysp)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 171 And Degback < 189 Then
Call Putchar(temp , 14 , Pysp)
Else
Temp = 0
Call Putchar(temp , 14 , Pysp)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 189 And Degback < 207 Then
Call Putchar(temp , 13 , Pysp)
Else
Temp = 0
Call Putchar(temp , 13 , Pysp)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 207 And Degback < 225 Then
Call Putchar(temp , 12 , Pysp)
Else
Temp = 0
Call Putchar(temp , 12 , Pysp)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 225 And Degback < 243 Then
Call Putchar(temp , 11 , Pysp)
Else
Temp = 0
Call Putchar(temp , 11 , Pysp)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 243 And Degback < 261 Then
Call Putchar(temp , 10 , Pysp)
Else
Temp = 0
Call Putchar(temp , 10 , Pysp)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 261 And Degback < 279 Then
Call Putchar(temp , 10 , Pys)
Else
Temp = 0
Call Putchar(temp , 10 , Pys)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 279 And Degback < 297 Then
Call Putchar(temp , 10 , Pysn)
Else
Temp = 0
Call Putchar(temp , 10 , Pysn)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 297 And Degback < 315 Then
Call Putchar(temp , 11 , Pysn)
Else
Temp = 0
Call Putchar(temp , 11 , Pysn)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 315 And Degback < 333 Then
Call Putchar(temp , 12 , Pysn)
Else
Temp = 0
Call Putchar(temp , 12 , Pysn)
End If
If Ppm < 2 Then
Temp = &HB4
Else
Temp = &H21
End If
If Degback >= 333 And Degback < 351 Then
Call Putchar(temp , 13 , Pysn)
Else
Temp = 0
Call Putchar(temp , 13 , Pysn)
End If
End If
'+++++++++++++++++++++++++++++++++group13++++++++++++++++++++++++++++++++++++++
If Sy = 0 Then Pyi = 11
If Sy = 1 Then Pyi = 13
If Navdisp = 1 Then
If Cours > 337 Or Cours < 22 Then
'N
Temp = &H49
Call Putchar(temp , 12 , Pyi)
Temp = 0
Call Putchar(temp , 13 , Pyi)
Temp = &H18
Call Putchar(temp , 14 , Pyi)
Temp = 0
Call Putchar(temp , 15 , Pyi)
Temp = &H49
Call Putchar(temp , 16 , Pyi)
End If
If Cours > 67 And Cours < 112 Then 'E !!!!!!!!!
Temp = &H49
Call Putchar(temp , 12 , Pyi)
Temp = 0
Call Putchar(temp , 13 , Pyi)
Temp = &H0F
Call Putchar(temp , 14 , Pyi)
Temp = 0
Call Putchar(temp , 15 , Pyi)
Temp = &H49
Call Putchar(temp , 16 , Pyi)
End If
If Cours > 247 And Cours < 292 Then 'W!!!!!!!!!
Temp = &H49
Call Putchar(temp , 12 , Pyi)
Temp = 0
Call Putchar(temp , 13 , Pyi)
Temp = &H21
Call Putchar(temp , 14 , Pyi)
Temp = 0
Call Putchar(temp , 15 , Pyi)
Temp = &H49
Call Putchar(temp , 16 , Pyi)
End If
If Cours > 157 And Cours < 202 Then 'S!!!!!!!!!
Temp = &H49
Call Putchar(temp , 12 , Pyi)
Temp = 0
Call Putchar(temp , 13 , Pyi)
Temp = &H1D
Call Putchar(temp , 14 , Pyi)
Temp = 0
Call Putchar(temp , 15 , Pyi)
Temp = &H49
Call Putchar(temp , 16 , Pyi)
End If
If Cours >= 22 And Cours <= 67 Then 'NE
Temp = &H18
Call Putchar(temp , 12 , Pyi)
Temp = 0
Call Putchar(temp , 13 , Pyi)
Temp = &H49
Call Putchar(temp , 14 , Pyi)
Temp = 0
Call Putchar(temp , 15 , Pyi)
Temp = &H0F
Call Putchar(temp , 16 , Pyi)
End If
If Cours >= 112 And Cours <= 157 Then 'ES
Temp = &H0F
Call Putchar(temp , 12 , Pyi)
Temp = 0
Call Putchar(temp , 13 , Pyi)
Temp = &H49
Call Putchar(temp , 14 , Pyi)
Temp = 0
Call Putchar(temp , 15 , Pyi)
Temp = &H1D
Call Putchar(temp , 16 , Pyi)
End If
If Cours >= 202 And Cours <= 247 Then 'SW
Temp = &H1D
Call Putchar(temp , 12 , Pyi)
Temp = 0
Call Putchar(temp , 13 , Pyi)
Temp = &H49
Call Putchar(temp , 14 , Pyi)
Temp = 0
Call Putchar(temp , 15 , Pyi)
Temp = &H21
Call Putchar(temp , 16 , Pyi)
End If
If Cours >= 292 And Cours <= 337 Then 'WN
Temp = &H21
Call Putchar(temp , 12 , Pyi)
Temp = 0
Call Putchar(temp , 13 , Pyi)
Temp = &H49
Call Putchar(temp , 14 , Pyi)
Temp = 0
Call Putchar(temp , 15 , Pyi)
Temp = &H18
Call Putchar(temp , 16 , Pyi)
End If
End If
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If Sy = 0 Then Pyn = 12
If Sy = 1 Then Pyn = 14
If Navdisp = 1 Then
If Ppm = 0 Or Ppm = 1 Then
Temp = &H56
Call Putchar(temp , 19 , Pyn)
If Calc_course_b > 337 Or Calc_course_b < 22 Then 'N
Temp = &HDB
Call Putchar(temp , 20 , Pyn)
End If
If Calc_course_b > 67 And Calc_course_b < 112 Then 'E
Temp = &HD9
Call Putchar(temp , 20 , Pyn)
End If
If Calc_course_b > 247 And Calc_course_b < 292 Then 'W
Temp = &HDD
Call Putchar(temp , 20 , Pyn)
End If
If Calc_course_b > 157 And Calc_course_b < 202 Then 'S
Temp = &HDF
Call Putchar(temp , 20 , Pyn)
End If
If Calc_course_b >= 22 And Calc_course_b <= 67 Then 'NE
Temp = &HDA
Call Putchar(temp , 20 , Pyn)
End If
If Calc_course_b >= 112 And Calc_course_b <= 157 Then 'SE
Temp = &HE0
Call Putchar(temp , 20 , Pyn)
End If
If Calc_course_b >= 202 And Calc_course_b <= 247 Then 'SW
Temp = &HDE
Call Putchar(temp , 20 , Pyn)
End If
If Calc_course_b >= 292 And Calc_course_b <= 337 Then 'NW
Temp = &HDC
Call Putchar(temp , 20 , Pyn)
End If
Else
Temp = 0
Call Putchar(temp , 19 , Pyn)
Call Putchar(temp , 20 , Pyn)
End If
End If
'+++++++++++++++++++++++++++group14++++++++++++++++++++++++++++++++++++++++++++
Temp = &HFB
Call Putchar(temp , 1 , Pyn)
'Temp = Hourt
'If Temp = 0 Then Temp = 10
'Call Putchar(temp , 2 , 14)
'Temp = Houre
'If Temp = 0 Then Temp = 10
'Call Putchar(temp , 3 , 14)
'Temp = &H44
'Call Putchar(temp , 2 , 14)
Temp = Minutet
If Temp = 0 Then Temp = 10
Call Putchar(temp , 2 , Pyn)
Temp = Minutee
If Temp = 0 Then Temp = 10
Call Putchar(temp , 3 , Pyn)
Temp = &H44
Call Putchar(temp , 4 , Pyn)
Temp = Secundt
If Temp = 0 Then Temp = 10
Call Putchar(temp , 5 , Pyn)
Temp = Secunde
If Temp = 0 Then Temp = 10
Call Putchar(temp , 6 , Pyn)
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Temp = &HB6
Call Putchar(temp , 25 , Pyn)
Temp = Satten
Call Putchar(temp , 26 , Pyn)
Temp = Satone
If Temp = 0 Then Temp = 10
Call Putchar(temp , 27 , Pyn)
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If Ppm = 0 Then
Toggle Portb.4
Else
Reset Portb.4
End If
'(
Temp = &HCA
Call Putchar(temp , 25 , Pyi)
Temp = Rssit
Call Putchar(temp , 26 , Pyi)
Temp = Rssie
If Temp = 0 Then Temp = 10
Call Putchar(temp , 27 , Pyi)
')
Reset Portd.6
If Button = 1 Then Bt = 0
If Button = 0 And Bt = 0 Then Waitms 10
If Button = 0 And Bt = 0 And Gpssig = 1 Then
Bt = 1
Tempref = Tempk
Altrefbar = Fpa
Altref = Altgps
Lonhome = Lon
Lathome = Lat
Writeeeprom Lathome , 0
Writeeeprom Lonhome , 16
Writeeeprom Tempref , 32
Writeeeprom Altrefbar , 48
Writeeeprom Altref , 64
Minute = 0
Secund = 0
Set Portd.6
Wait 1
Reset Portd.6
End If
End If
End If
Loop
End
Sub Get_distance_course(byval Lat As Double , Byval Lon As Double , Byval Latref As Double , Byval Lonref As Double)
Local Tmp As Double , A As Double , B As Double , C As Double , T2 As Double
' 1 Degree is 69.096 miles, 1 mile is 1609.34 m
A = Latref * Mpi 'Mpi
A = Cos(a)
T2 = Lat * Mpi
T2 = Cos(t2)
A = A * T2
T2 = Lonref * Mpi
T2 = Cos(t2)
A = A * T2
T2 = Lon * Mpi
T2 = Cos(t2)
A = A * T2
B = Latref * Mpi
B = Cos(b)
T2 = Lonref * Mpi
T2 = Sin(t2)
B = B * T2
T2 = Lat * Mpi
T2 = Cos(t2)
B = B * T2
T2 = Lon * Mpi
T2 = Sin(t2)
B = B * T2
C = Latref * Mpi
C = Sin(c)
T2 = Lat * Mpi
T2 = Sin(t2)
C = C * T2
T2 = A + B
T2 = T2 + C
A = Abs(t2)
If A >= 1 Then
Calc_distance = 0
Else
T2 = Acos(t2)
Tmp = T2
T2 = T2 * Radiusearth
Calc_distance = T2
Calc_distance = Round(calc_distance)
Calc_distancel = Calc_distance
End If
'Calculate bearing course
A = Lat * Mpi
A = Sin(a)
B = Latref * Mpi
B = Sin(b)
T2 = Cos(tmp)
B = B * T2
C = Latref * Mpi
C = Cos(c)
T2 = Sin(tmp)
C = C * T2
A = A - B
A = A / C
A = Acos(a)
A = Rad2deg(a)
B = Lon * Mpi
C = Lonref * Mpi
Tmp = B - C
If Tmp < 0.0 Then A = 360 - A
Calc_course_d = Round(a)
Calc_course_l = Calc_course_d
End Sub
'*******************************MAX7456*********************************
Sub Putchar(byval Char As Byte , Byval Xo As Byte , Byval Yo As Byte)
Local Ch As Byte
Local Tmp1 As Word
Tmp1 = Yo * 30
Tmp1 = Tmp1 + Xo
Ch = High(tmp1)
Call Sendcom(5 , Ch)
Ch = Low(tmp1)
Call Sendcom(6 , Ch)
Ch = Temp
Call Sendcom(7 , Ch)
End Sub
Sub Sendcom(byval Adre As Byte , Byval Dat As Byte)
Reset Cs
Waitus 5
Shiftout Da , Cl , Adre , 1
Waitus 5
Shiftout Da , Cl , Dat , 1
Waitus 5
Set Cs
End Sub
Sub Writecustomcharacter
Call Sendcom(0 , &B01000100)
Call Sendcom(&H09 , Place)
For Lus = 0 To 53
Call Sendcom(&H0a , Lus)
Lus1 = Lus + 1
Regdata = Rdata(lus1)
Waitms 1
Call Sendcom(&H0b , Regdata)
Next Lus
Call Sendcom(&H08 , &HA0)
Waitms 300
End Sub
Writecar:
W = 0
Begin:
For I = 0 To 28
Temp = I
J = I
Call Putchar(temp , J , 3)
Next I
For I = 29 To 58
Temp = I
J = I - 29
Call Putchar(temp , J , 4)
Next I
For I = 59 To 87
Temp = I
J = I - 59
Call Putchar(temp , J , 5)
Next I
For I = 88 To 116
Temp = I
J = I - 88
Call Putchar(temp , J , 6)
Next I
For I = 117 To 145
Temp = I
J = I - 117
Call Putchar(temp , J , 7)
Next I
For I = 146 To 174
Temp = I
J = I - 146
Call Putchar(temp , J , 8)
Next I
For I = 175 To 203
Temp = I
J = I - 175
Call Putchar(temp , J , 9)
Next I
For I = 204 To 232
Temp = I
J = I - 204
Call Putchar(temp , J , 10)
Next I
For I = 233 To 255
Temp = I
J = I - 233
Call Putchar(temp , J , 11)
Next I
Nextkar:
If W = 0 Then
Place = Waitkey(#1)
For Lus = 0 To 53
Dat = Waitkey(#1)
Lus1 = Lus + 1
Rdata(lus1) = Dat
Toggle Portd.6
Next Lus
Writecustomcharacter
End If
If Place = 255 Then
Goto Begin
W = 1
End If
'Print #1 , "T";
Goto Nextkar
Gpsdata:
'cxa-510na JRC protokoll
Incr K
Jrc(k) = Waitkey(#1)
If Jrc(k) = &HA0 Then
K = 0
End If
If Jrc(k) = &HF0 Then
Once = 0
End If
Return
Amit leltem:
- lebegőpontos számítás van benne (float) és azzal veszik valahol össze.
Az fp_trig.lbx függvénykönyvtár mintha nem lenne automatikusan meghívva a programban.
$lib "fp_trig.lbx"
de ekkor még van 2 függvényhívás ami hiányzik....
a getframespace2zx8
A függvénykönyvtárakban való hivatkozás:
1.11.8.3: 6 függvénykönyvtár
1.11.9.8: 5 függvénykönyvtárban (fp_trig.lib hiányzik)
2.0.6.2: 6 fw
2.0.7.0: 3 fw
!
Szóval melyikkel is megy? Én a függvénykönyvtárakban látom a hibát...
- lebegőpontos számítás van benne (float) és azzal veszik valahol össze.
Az fp_trig.lbx függvénykönyvtár mintha nem lenne automatikusan meghívva a programban.
$lib "fp_trig.lbx"
de ekkor még van 2 függvényhívás ami hiányzik....
a getframespace2zx8
A függvénykönyvtárakban való hivatkozás:
1.11.8.3: 6 függvénykönyvtár
1.11.9.8: 5 függvénykönyvtárban (fp_trig.lib hiányzik)
2.0.6.2: 6 fw
2.0.7.0: 3 fw
!
Szóval melyikkel is megy? Én a függvénykönyvtárakban látom a hibát...
Alakul már csak 2 sor hiba van:
Error : 221 Line : 2023 Backward jump out of range [_GETFRAMESPACE2XZ8 [ 18526]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2023 Backward jump out of range [_GETFRAMESPACE2XZ8 [ 18539]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2023 Backward jump out of range [_GETFRAMESPACE2XZ8 [ 18526]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas
Error : 221 Line : 2023 Backward jump out of range [_GETFRAMESPACE2XZ8 [ 18539]] , in File : C:\Documents and Settings\GP\Dokumentumok\gps\OSDcxa510compass.bas