'ipana020 20050803 swrtopixval lookup table for mfj-like display 'ipana021 20050805 improved frequency sweep accuracy 'ipana022 20050807 corrected sweep pixel layout, included zer-span capability (signal-generator!) 'ipana023 20050808 code clean-up '$sim $regfile = "m32def.dat" $crystal = 13560000 'config graphlcd Config Graphlcd = 128 * 64 , Dataport = Portb , Controlport = Portc , Ce = 5 , Cd = 6 , Wr = 3 , Rd = 4 , Reset = 7 , Fs = 2 , Mode = 8 'config in-outputs Config Portd.6 = Output Fqud Alias Portd.6 Config Portd.5 = Output Wclk Alias Portd.5 Config Portd.4 = Output Ddsdata Alias Portd.4 Config Portd.7 = Output Adccs Alias Portd.7 Config Portc.0 = Output Adcclk Alias Portc.0 Config Portc.1 = Input Adcphasein Alias Pinc.1 Adcphaseinpullup Alias Portc.1 Config Portc.2 = Input Adcmagnin Alias Pinc.2 Adcmagninpullup Alias Portc.2 Config Portd.3 = Input Modeswitch Alias Pind.3 Config Portd.1 = Output Beeper Alias Portd.1 Config Porta = Input Buttons Alias Pina Const Version = "V0.23" '180 degrees divided by 1023 adc steps Const Adcphres = 0.176 '60 dB divided by 1023 adc steps Const Adcmagres = 0.05865 'from radians to degrees Const R2d = 57.296 'Standard characteristic impedance Const Z0 = 50.0 'Number of frequencies to scan Const Frequencies = 115 'mid-frequency number (frequencies/2+1) Const Midfreq = 58 'Vertical number of pixels in graph Const Vertpix = 49 'vertical pixel erase range Const Vertpixerase = Vertpix - 1 'vertical and horizontal offset to place pixel in graph window Const Vertpixoffset = 7 Const Horpixoffset = 11 'keyboard debounce time Const Debouncetime = 50 'keypressed beeper duration Const Beepduration = 100 'keypressed beeper frequency Const Beepfrequency = 500 'bad choice beeper duration Const Bcbeepduration = 100 'bad choice beeper frequency Const Bcbeepfrequency = 750 'DDS frequency low limit (kHz) Const Ddsfreqlowlimit = 1000 'DDS frequency high limit (kHz) Const Ddsfreqhighlimit = 60000 'Maximum index of Fsteps data table (see end of program) Const Fstepsnum = 9 'Maximum index of Fspans data table Const Fspansnum = 10 'Default Fsteps data table index Const Fstepsdefault = 3 'Default Fspans data table index Const Fspansdefault = 4 'buttons Dim Buttonvalue As Byte Dim Buttonpushed As Byte 'beeper Dim Beepcount As Word Dim Beeplength As Word Dim Beeptone As Byte 'dds tuningword Dim Ddstuningword As Long 'fourth byte holding dds config Dim Twbyte4 As Byte 'variables to hold constants to add to dds tuning word 'it would be nice to have unsigned longs in bascom... Dim Mhz10 As Long Dim Mhz1 As Long Dim Khz100 As Long Dim Khz10 As Long Dim Khz1 As Long 'frequency variables Dim Freqcentre As Long Dim Freqspan As Long Dim Freqstep As Long Dim Freqstart As Long Dim Freqaxisintv As Long Dim Freqintv As Single Dim Freqddstmp As Single Dim Freqtmp As Long Dim Freqtmp1 As Long Dim Freqstsptmp As Long Dim Freqstepdisp As String * 4 Dim Freqstepindex As Byte Dim Freqspanindex As Byte Dim Freqstspindex As Byte 'additional variables for the calculation of dds tuning word Dim Ddsfreq As Long Dim Ddstmp As Long Dim Ddsnum As Word Dim Ddsaddnum As Word Dim Ddsdiv As Word 'adc variables Dim Adcphase As Word Dim Adcmagnitude As Word Dim Adcbit As Word Dim Adccount As Byte 'swr etc. variables Dim Returnloss As Single Dim Angle As Single Dim Mag As Single Dim F As Single Dim G As Single Dim Rr As Single Dim Ss As Single Dim Ximp As Single Dim Rimp As Single Dim Zimp As Single Dim Swr As Single Dim Rrsqrtmp As Single Dim Sssqrtmp As Single Dim Tmpsa As Single Dim Tmpsb As Single Dim Tmpsc As Single 'lcd character placement variables Dim Hpos As Byte Dim Vpos As Byte Dim Charhor As Byte Dim Charline As Byte 'Dim Testcnt As Byte 'Dim Testint As Integer Dim Pixcount As Byte Dim Pixhor As Byte Dim Pixval As Byte Dim Pointcount As Byte 'lcd character string variables Dim Shortstr As String * 10 Dim Valstr As String * 20 Dim Charseries As String * 46 'plot line variables Dim Line1pix(frequencies) As Byte Dim Pixlen As Integer Dim Pixlenfirst As Integer Dim Pix As Byte Dim Pixbetween As Byte Dim Pixtodo As Byte Dim Pixdir As Bit Dim Freqloopcnt As Byte Dim Xaxispixrange As Word Dim Yaxispixrange As Word Dim Xaxisrange As Word Dim Yaxisrange As Word Dim Arrowon As Bit Dim Swrtmp As Single Dim Pixperswr As Single Dim Swrtopixvalarray(vertpix) As Single Dim Zerospan As Bit Dim Numfreqtoplot As Word 'Subroutine declarations 'sub to plot very small font Declare Sub Cplcd(byval Charhor As Byte , Byval Charline As Byte , Valstr As String) 'sub to plot axis Declare Sub Plaxis 'sub to plot axis labels Declare Sub Plaxislabels 'sub to plot welcome screen Declare Sub Welcome 'sub to send dds tuning word to dds Declare Sub Sendddstuningword(ddstuningword As Long) 'sub to calculate ddstuningword from frequency Declare Sub Calcddstuningword(ddsfreq As Long) 'sub to reset dds Declare Sub Resetdds 'sub to read tlc1549 adc's Declare Sub Readadc 'sub to calculate swr, return-loss, phase and z Declare Sub Docalcall 'sub to calc swr only Declare Sub Docalcswr 'sub to convert swr etc. to graph pixelvalues Declare Sub Calctopix 'sub to update frequency settings Declare Sub Updfreq 'sub to read buttons Declare Sub Readbuttons 'sub to sound a beeper Declare Sub Soundbeeper(byval Beeplength As Word , Byval Beeptone As Byte) 'program starts here 'charseries is not in a data statement because lookdown does not work for 'strings 'first char is "?", used for unknown chars Charseries = "?/^v .-@%&0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" 'provide pull-up for adc data outputs Set Adcphaseinpullup Set Adcmagninpullup 'reset dds control lines Reset Wclk Reset Ddsdata Reset Fqud 'disable adc's, adc clock inactive Set Adccs Set Adcclk Buttonpushed = 255 'frequency digit values to add to dds tuning word Mhz10 = 238609294 Mhz1 = 23860929 Khz100 = 2386093 Khz10 = 238609 Khz1 = 23861 'read swrtopixvalarray from datablock Restore Swrtopixval For Pixval = 1 To Vertpix Read Swrtopixvalarray(pixval) Next Pixval 'reset dds several times to ensure correct startup For Freqloopcnt = 1 To 10 Call Resetdds Next Freqloopcnt Call Soundbeeper(100 , 1) Call Welcome Call Soundbeeper(100 , 1) 'enable porta pull-ups Porta = &B11111111 Waitms 250 'Erase line1pix For Pix = 1 To Frequencies Line1pix(pix) = 8 Next Pix 'set default frequencies (kHz) Freqcentre = 3700 Freqspanindex = Fspansdefault Reset Zerospan Freqspan = Lookup(freqspanindex , Fspans) Freqstepindex = Fstepsdefault Freqstep = Lookup(freqstepindex , Fsteps) Freqstepdisp = Lookupstr(fstepsdefault , Fstepsdisp) Do Startsweep: Call Plaxis Call Plaxislabels Freqtmp = Freqspan / 2 Freqstart = Freqcentre - Freqtmp 'intv: frequencies-1! Freqintv = Freqspan / 114 If Zerospan = 0 Then Ddsfreq = Freqstart Else Ddsfreq = Freqcentre End If Freqddstmp = Ddsfreq Numfreqtoplot = Frequencies 'Do a sweep accross frequencies For Freqloopcnt = 1 To Numfreqtoplot Call Readbuttons If Buttonpushed <> 255 Then Call Soundbeeper(100 , 1) Call Updfreq Buttonpushed = 255 Goto Startsweep End If Call Calcddstuningword(ddsfreq) Call Sendddstuningword(ddstuningword) Call Readadc If Freqloopcnt = Midfreq Then 'at centre frequency calculate all parameters Call Docalcall Valstr = " " Call Cplcd(25 , 0 , Valstr) 'check swr limit only for f-centre If Swr > 9.99 Then Shortstr = " HI " Else Shortstr = Fusing(swr , "#.##") End If Call Cplcd(25 , 0 , Shortstr) If Returnloss < 0 Then Shortstr = Fusing(returnloss , "##.#") If Returnloss < -10 Then Shortstr = " " + Shortstr Else Shortstr = "---.-" End If Call Cplcd(50 , 0 , Shortstr) Shortstr = Fusing(zimp , "####.#") If Zimp < 1000 Then Shortstr = " " + Shortstr If Zimp < 100 Then Shortstr = " " + Shortstr Call Cplcd(80 , 0 , Shortstr) Else 'at other points only swr is calculated to speed up the sweep Call Docalcswr End If Pixcount = Freqloopcnt - 1 Pixcount = Pixcount + Horpixoffset 'Erase line1pix For Pix = 1 To Vertpixerase Pixval = Pix + Vertpixoffset Pset Pixcount , Pixval , 0 Next Pixlen 'determine index of swr in swrtopixval datablock, this is the pixel 'value to use in the graph For Pixval = 1 To Vertpix If Swr > Swrtopixvalarray(pixval) Then Goto Exitarrayindex Next Pixval Exitarrayindex: Pixval = Pixval + Vertpixoffset Line1pix(freqloopcnt) = Pixval 'plot new point of line1 Pset Pixcount , Line1pix(freqloopcnt) , 1 If Freqloopcnt > 1 Then 'Plot Line From Point n-1 To Point n Pixlenfirst = Freqloopcnt - 1 Pixlen = Line1pix(pixlenfirst) - Line1pix(freqloopcnt) If Pixlen > 0 Then Set Pixdir Else Reset Pixdir End If Pixlen = Abs(pixlen) If Pixlen > 0 Then Pixlenfirst = Pixlen / 2 Pixlen = Pixlen - Pixlenfirst Pixtodo = Pixlenfirst Pixlenfirst = Freqloopcnt - 1 Pixbetween = Line1pix(pixlenfirst) Pixcount = Pixcount - 1 If Pixtodo > 0 Then For Pix = 1 To Pixtodo If Pixdir = 1 Then Pixbetween = Pixbetween - 1 Else Pixbetween = Pixbetween + 1 End If Pset Pixcount , Pixbetween , 1 Next Pix End If Pixcount = Pixcount + 1 Pixtodo = Pixlen If Pixtodo > 0 Then For Pix = 1 To Pixtodo If Pixdir = 1 Then Pixbetween = Pixbetween - 1 Else Pixbetween = Pixbetween + 1 End If Pset Pixcount , Pixbetween , 1 Next Pix End If End If End If 'next frequency If Zerospan = 0 Then Freqddstmp = Freqddstmp + Freqintv Ddsfreq = Round(freqddstmp) End If Next Freqloopcnt Loop End '####################################subroutines follow########################### Sub Cplcd(byval Charhor As Byte , Byval Charline As Byte , Valstr As String) 'Place character bits from character set in data block on lcd 'charhor is horizontal and charline is vertical pixel position Local Charcnt As Byte Local Slen As Byte Local Charinstr As String * 1 Local Pixcolumn As Byte Local Rowindata As Byte Local Pixbit As Byte Local Bitval As Byte Local Charvert As Byte Slen = Len(valstr) 'do for all characters in string For Charcnt = 1 To Slen 'get char from string Charinstr = Mid(valstr , Charcnt , 1) Pixcolumn = Instr(charseries , Charinstr) 'if char not in charseries, use ? If Pixcolumn = 0 Then Pixcolumn = 1 Pixcolumn = Pixcolumn - 1 Rowindata = Pixcolumn * 5 'for all five pixel columns in character For Hpos = 0 To 4 Pixcolumn = Lookup(rowindata , Chrset) Bitval = 16 'for all five pixel rows in character For Vpos = 0 To 4 Pixbit = Pixcolumn And Bitval Charvert = Charline + Vpos 'place the bit! Pset Charhor , Charvert , Pixbit Bitval = Bitval / 2 Next Vpos Charhor = Charhor + 1 Rowindata = Rowindata + 1 Next Hpos Next Charcnt End Sub Sub Plaxis Line(10 , 7) -(126 , 7) , 255 Line(126 , 7) -(126 , 57) , 255 Line(126 , 57) -(10 , 57) , 255 Line(10 , 57) -(10 , 7) , 255 'ticks at left y-axis Pset 9 , 8 , 1 Pset 9 , 22 , 1 Pset 9 , 32 , 1 Pset 9 , 37 , 1 Pset 9 , 42 , 1 Pset 9 , 51 , 1 Pset 9 , 56 , 1 'ticks at bottom x-axis Pset 11 , 58 , 1 Pset 40 , 58 , 1 Pset 68 , 58 , 1 Pset 97 , 58 , 1 Pset 125 , 58 , 1 'ticks at right y-axis Pset 127 , 8 , 1 Pset 127 , 22 , 1 Pset 127 , 32 , 1 Pset 127 , 37 , 1 Pset 127 , 42 , 1 Pset 127 , 51 , 1 Pset 127 , 56 , 1 'ticks at top x-axis Pset 11 , 6 , 1 Pset 40 , 6 , 1 Pset 68 , 6 , 1 Pset 97 , 6 , 1 Pset 125 , 6 , 1 End Sub Sub Plaxislabels Freqtmp = Freqspan / 2 Freqstart = Freqcentre - Freqtmp Freqaxisintv = Freqspan / 20 If Zerospan = 0 Then Freqstart = Freqstart / 10 Valstr = Str(freqstart) Shortstr = Format(valstr , "00.00") Else Shortstr = "....." End If Call Cplcd(0 , 59 , Shortstr) If Zerospan = 0 Then Freqstart = Freqstart + Freqaxisintv Else Freqstart = Freqcentre / 10 End If Valstr = Str(freqstart) Shortstr = Format(valstr , "00.00") Call Cplcd(56 , 59 , Shortstr) If Zerospan = 0 Then Freqstart = Freqstart + Freqaxisintv Valstr = Str(freqstart) Shortstr = Format(valstr , "00.00") Else Shortstr = "....." End If Call Cplcd(102 , 59 , Shortstr) 'narrow chars first, then 'wide' chars can partly overwrite 'narrow 7 (1.7) Valstr = "&" Call Cplcd(3 , 35 , Valstr) 'narrow 5 (1.5) Valstr = "%" Call Cplcd(3 , 40 , Valstr) 'narrow 2 (1.2) Valstr = "@" Call Cplcd(3 , 49 , Valstr) Valstr = "H" Call Cplcd(0 , 6 , Valstr) Valstr = "3" Call Cplcd(0 , 20 , Valstr) Valstr = "2" Call Cplcd(0 , 30 , Valstr) Valstr = "1" Call Cplcd(0 , 53 , Valstr) 'display frequency step at top left Valstr = Freqstepdisp Call Cplcd(0 , 0 , Valstr) End Sub Sub Welcome Cls Wait 1 Cursor Off Valstr = "IW3HEV / PA3CKR" Call Cplcd(29 , 20 , Valstr) Valstr = "ANTENNA ANALYSER" Call Cplcd(25 , 30 , Valstr) Valstr = Version Call Cplcd(56 , 50 , Valstr) Wait 2 Cls End Sub Sub Sendddstuningword(ddstuningword As Long) 'shift out ddstuningword bits, lsb first on clock high, send to dds Shiftout , Ddsdata , Wclk , Ddstuningword , 3 'shift out fifth byte, lsb first on clock high, only refclk multiplier bit is set Twbyte4 = &B00000001 Shiftout , Ddsdata , Wclk , Twbyte4 , 3 'toggle fqud to latch data in dds Set Fqud nop Reset Fqud End Sub Sub Calcddstuningword(ddsfreq As Long) 'Scan ddsfreq digits and add digit values to ddstuningword Ddstmp = Ddsfreq Ddsdiv = 10000 Ddstuningword = 0 'calculate dds tuning word 'number of mhz10 Ddsnum = Ddstmp / Ddsdiv For Ddsaddnum = 1 To Ddsnum Ddstuningword = Ddstuningword + Mhz10 Ddstmp = Ddstmp - 10000 Next Ddsaddnum Ddsdiv = 1000 'number of mhz1 Ddsnum = Ddstmp / Ddsdiv For Ddsaddnum = 1 To Ddsnum Ddstuningword = Ddstuningword + Mhz1 Ddstmp = Ddstmp - 1000 Next Ddsaddnum Ddsdiv = 100 'number of khz100 Ddsnum = Ddstmp / Ddsdiv For Ddsaddnum = 1 To Ddsnum Ddstuningword = Ddstuningword + Khz100 Ddstmp = Ddstmp - 100 Next Ddsaddnum Ddsdiv = 10 'number of khz10 Ddsnum = Ddstmp / Ddsdiv For Ddsaddnum = 1 To Ddsnum Ddstuningword = Ddstuningword + Khz10 Ddstmp = Ddstmp - 10 Next Ddsaddnum 'number of khz1 is remainder of ddstmp Ddsnum = Ddstmp For Ddsaddnum = 1 To Ddsnum Ddstuningword = Ddstuningword + Khz1 Next Ddsaddnum End Sub Sub Resetdds Ddstuningword = 0 Shiftout , Ddsdata , Wclk , Ddstuningword , 3 Twbyte4 = 0 Shiftout , Ddsdata , Wclk , Twbyte4 , 3 'toggle fqud to latch data in dds Set Fqud nop Reset Fqud End Sub Sub Readadc 'read both tlc1549 adc's 'set adcphase and adcmagnitude to zero Adcphase = 0 Adcmagnitude = 0 'start with bit 9 Adcbit = 512 'enable adc's Reset Adccs 'Waitus 100 'only in breadboard... 'repeat for adc bits 9 to 0 While Adcbit > 0 'For Adccount = 1 To 10 'adc clock low Reset Adcclk 'Waitus 100 'only in breadboard... 'read adc's input bit If Adcphasein = 1 Then Adcphase = Adcphase + Adcbit End If If Adcmagnin = 1 Then Adcmagnitude = Adcmagnitude + Adcbit End If 'set adc clock high Set Adcclk 'Waitus 100 'only in breadboard... 'shift adcbit right (divide by 2 to get next bit value) Shift Adcbit , Right Wend 'Next Adccount 'disable adc's Set Adccs 'adc clock high Set Adcclk End Sub Sub Docalcall Returnloss = Adcmagnitude * Adcmagres Returnloss = Returnloss - 30.0 Angle = Adcphase * Adcphres Tmpsa = Returnloss / 20.0 Tmpsb = 10.0 Mag = Power(tmpsb , Tmpsa) Mag = 1.0 / Mag Tmpsa = 1.0 + Mag Tmpsb = 1.0 - Mag Tmpsc = Tmpsa / Tmpsb Swr = Abs(tmpsc) Tmpsa = Angle / R2d F = Cos(tmpsa) G = Sin(tmpsa) Rr = F * Mag Ss = G * Mag Tmpsa = 1.0 - Rr Rrsqrtmp = Tmpsa * Tmpsa Sssqrtmp = Ss * Ss Tmpsa = Rrsqrtmp + Sssqrtmp Tmpsb = 2.0 * Ss Tmpsc = Tmpsb / Tmpsa Tmpsa = Tmpsc * Z0 Ximp = Abs(tmpsa) Tmpsa = Rr * Rr Tmpsb = 1.0 - Tmpsa Tmpsa = Tmpsb - Sssqrtmp Tmpsb = Rrsqrtmp + Sssqrtmp Tmpsc = Tmpsa / Tmpsb Tmpsa = Tmpsc * Z0 Rimp = Abs(tmpsa) Tmpsa = Rimp * Rimp Tmpsb = Ximp * Ximp Tmpsc = Tmpsa + Tmpsb Zimp = Sqr(tmpsc) End Sub Sub Docalcswr Returnloss = Adcmagnitude * Adcmagres Returnloss = Returnloss - 30.0 Angle = Adcphase * Adcphres Tmpsa = Returnloss / 20.0 Tmpsb = 10.0 Mag = Power(tmpsb , Tmpsa) Mag = 1.0 / Mag Tmpsa = 1.0 + Mag Tmpsb = 1.0 - Mag Tmpsc = Tmpsa / Tmpsb Swr = Abs(tmpsc) End Sub Sub Updfreq 'Frequency up button If Buttonpushed = 253 Then Freqtmp = Freqspan / 2 Freqtmp = Freqcentre + Freqtmp Freqtmp = Freqtmp + Freqstep If Freqtmp > Ddsfreqhighlimit Then Call Soundbeeper(50 , 2) Else Freqcentre = Freqcentre + Freqstep End If End If 'Frequency down button If Buttonpushed = 254 Then Freqtmp = Freqspan / 2 Freqtmp = Freqcentre - Freqtmp Freqtmp = Freqtmp - Freqstep If Freqtmp < Ddsfreqlowlimit Then Call Soundbeeper(50 , 2) Else Freqcentre = Freqcentre - Freqstep End If End If 'Frequency span up button If Buttonpushed = 247 Then Reset Zerospan If Freqspanindex = Fspansnum Then Call Soundbeeper(50 , 2) Else Freqstspindex = Freqspanindex + 1 Freqstsptmp = Lookup(freqstspindex , Fspans) Freqtmp = Freqstsptmp / 2 Freqtmp = Freqcentre - Freqtmp Freqtmp1 = Freqstsptmp / 2 Freqtmp1 = Freqcentre + Freqtmp1 If Freqtmp < Ddsfreqlowlimit Or Freqtmp1 > Ddsfreqhighlimit Then Call Soundbeeper(50 , 2) Else Freqspanindex = Freqstspindex Freqspan = Freqstsptmp End If End If End If 'Frequency span down button If Buttonpushed = 251 Then If Freqspanindex = 0 Then Set Zerospan 'Call Soundbeeper(50 , 2) Else Freqstspindex = Freqspanindex - 1 Freqstsptmp = Lookup(freqstspindex , Fspans) Freqtmp = Freqstsptmp / 2 Freqtmp = Freqcentre - Freqtmp Freqtmp1 = Freqstsptmp / 2 Freqtmp1 = Freqcentre + Freqtmp1 If Freqtmp < Ddsfreqlowlimit Or Freqtmp1 > Ddsfreqhighlimit Then Call Soundbeeper(50 , 2) Else Freqspanindex = Freqstspindex Freqspan = Freqstsptmp End If End If End If 'Frequency step up button If Buttonpushed = 223 Then If Freqstepindex = Fstepsnum Then Call Soundbeeper(50 , 2) Else Freqstepindex = Freqstepindex + 1 Freqstep = Lookup(freqstepindex , Fsteps) Freqstepdisp = Lookupstr(freqstepindex , Fstepsdisp) End If End If 'Frequency step down button If Buttonpushed = 239 Then If Freqstepindex = 0 Then Call Soundbeeper(50 , 2) Else Freqstepindex = Freqstepindex - 1 Freqstep = Lookup(freqstepindex , Fsteps) Freqstepdisp = Lookupstr(freqstepindex , Fstepsdisp) End If End If End Sub Sub Readbuttons 'read button state Buttonvalue = Buttons If Buttonvalue <> 255 Then Buttonpushed = Buttonvalue 'a button is pushed, wait debounce Waitms 25 Buttonvalue = 0 'wait until button is released While Buttonvalue <> 255 Buttonvalue = Buttons Wend 'wait debounce Waitms 25 End If End Sub Sub Soundbeeper(byval Beeplength As Word , Byval Beeptone As Byte) For Beepcount = 1 To Beeplength Toggle Beeper Waitms Beeptone Toggle Beeper Waitms Beeptone Next Beepcount End Sub End '####################################data blocks follow########################### 'Lookup table to translate swr value to pixel value to get a 'mfj-259 like' swr scale Swrtopixval: Data 56.1351! , 35.6368! , 23.0012! , 15.4338! , 11.0163! , 8.47162! , 6.98175! , 6.04771! , 5.38498! Data 4.84656! , 4.36835! , 3.93163! , 3.53859! , 3.19748! , 2.91467! , 2.69127! , 2.52276! , 2.40019! Data 2.31217! , 2.24682! , 2.1935! , 2.1439! , 2.0926! , 2.03703! , 1.97707! , 1.91426! , 1.85099! Data 1.78971! , 1.73225! , 1.67945! , 1.63112! , 1.58617! , 1.54307! , 1.5004! , 1.45736! , 1.4142! Data 1.37227! , 1.3337! , 1.30066! , 1.27413! , 1.25255! , 1.23051! , 1.19826! , 1.1428! , 1.1! Data 1.05! , 1.03! , 1.01! , 1! 'Note: when Fsteps, Fstepsdisp or Fspans are changed, update Fstepsnum/Fspansnum constants accordingly! 'Frequency step values available Fsteps: Data 10& , 20& , 50& , 100& , 200& , 500& , 1000& , 2000& , 5000& , 10000& 'Frequency step value in display Fstepsdisp: Data " 10K" , " 20K" , " 50K" , "100K" , "200K" , "500K" , " 1M" , " 2M" , " 5M" , " 10M" 'Frequency span values available Fspans: Data 20& , 50& , 100& , 200& , 500& , 1000& , 2000& , 5000& , 10000& , 20000& , 50000& 'Small (5 pixel wide and 5 pixel height) character set Chrset: Data &B00000000 , &B00001000 , &B00010000 , &B00010101 , &B00001000 '? Data &B00000000 , &B00000011 , &B00000100 , &B00001000 , &B00010000 '/ Data &B00000000 , &B00001000 , &B00011111 , &B00011111 , &B00001000 '^(up arrow) Data &B00000000 , &B00000010 , &B00011111 , &B00011111 , &B00000010 'v(dn arrow) Data &B00000000 , &B00000000 , &B00000000 , &B00000000 , &B00000000 'space Data &B00000000 , &B00000000 , &B00000001 , &B00000000 , &B00000000 '. Data &B00000000 , &B00000000 , &B00000100 , &B00000100 , &B00000100 '- Data &B00000000 , &B00000000 , &B00001011 , &B00010101 , &B00001001 '@(narrow 2) Data &B00000000 , &B00000000 , &B00011101 , &B00010101 , &B00010010 '%(narrow 5) Data &B00000000 , &B00000000 , &B00010000 , &B00010111 , &B00011000 '&(narrow 7) Data &B00000000 , &B00001110 , &B00010001 , &B00010001 , &B00001110 '0 Data &B00000000 , &B00001001 , &B00011111 , &B00000001 , &B00000000 '1 Data &B00000000 , &B00001011 , &B00010101 , &B00010101 , &B00001001 '2 Data &B00000000 , &B00001010 , &B00010001 , &B00010101 , &B00001110 '3 Data &B00000000 , &B00000110 , &B00001010 , &B00011111 , &B00000010 '4 Data &B00000000 , &B00011101 , &B00010101 , &B00010101 , &B00010010 '5 Data &B00000000 , &B00000010 , &B00001101 , &B00010101 , &B00000010 '6 Data &B00000000 , &B00010000 , &B00010011 , &B00010100 , &B00011000 '7 Data &B00000000 , &B00001010 , &B00010101 , &B00010101 , &B00001010 '8 Data &B00000000 , &B00001000 , &B00010101 , &B00010110 , &B00001100 '9 Data &B00000000 , &B00001111 , &B00010100 , &B00010100 , &B00001111 'A Data &B00000000 , &B00011111 , &B00010101 , &B00010101 , &B00001010 'B Data &B00000000 , &B00001110 , &B00010001 , &B00010001 , &B00010001 'C Data &B00000000 , &B00011111 , &B00010001 , &B00010001 , &B00001110 'D Data &B00000000 , &B00011111 , &B00010101 , &B00010001 , &B00010001 'E Data &B00000000 , &B00011111 , &B00010100 , &B00010000 , &B00010000 'F Data &B00000000 , &B00001110 , &B00010001 , &B00010101 , &B00010111 'G Data &B00000000 , &B00011111 , &B00000100 , &B00000100 , &B00011111 'H Data &B00000000 , &B00010001 , &B00011111 , &B00010001 , &B00000000 'I Data &B00000000 , &B00010010 , &B00010001 , &B00010001 , &B00011110 'J Data &B00000000 , &B00011111 , &B00000100 , &B00001010 , &B00010001 'K Data &B00000000 , &B00011111 , &B00000001 , &B00000001 , &B00000001 'L Data &B00000000 , &B00011111 , &B00011000 , &B00011000 , &B00011111 'M Data &B00000000 , &B00011111 , &B00011000 , &B00000110 , &B00011111 'N Data &B00000000 , &B00001110 , &B00010001 , &B00010001 , &B00001110 'O Data &B00000000 , &B00011111 , &B00010100 , &B00010100 , &B00001000 'P Data &B00000000 , &B00001110 , &B00010001 , &B00010011 , &B00001111 'Q Data &B00000000 , &B00011111 , &B00010100 , &B00010110 , &B00001001 'R Data &B00000000 , &B00001001 , &B00010101 , &B00010101 , &B00010010 'S Data &B00000000 , &B00010000 , &B00011111 , &B00010000 , &B00000000 'T Data &B00000000 , &B00011110 , &B00000001 , &B00000001 , &B00011110 'U Data &B00000000 , &B00011100 , &B00000010 , &B00000001 , &B00011110 'V Data &B00000000 , &B00011111 , &B00000011 , &B00000011 , &B00011111 'W Data &B00000000 , &B00010001 , &B00001010 , &B00000110 , &B00011001 'X Data &B00000000 , &B00010001 , &B00001010 , &B00000100 , &B00011000 'Y Data &B00000000 , &B00010011 , &B00010101 , &B00010101 , &B00011001 'Z