You don't need a lookup table for this... All you need to do is some function that do this:
dB = ConvertToDec(currentHexValue) - 48 * 0.5
Here is a little function that I did for you. Just pass in the current hex value and it'll spit out the dB
VB Code:
Private Function Translate2dB(ByVal strHexInput As String) As String
Dim retval As String = "0.0 dB"
Dim inputVal As Integer = 48
Dim diff As Integer = 0
Try
'Convert Hex to Dec
inputVal = Val("&H" & strHexInput)
'Find the different
diff = inputVal - 48
'Then multiply the diff by 0.5
If diff > 0 Then
retval = (diff * 0.5).ToString("0.0") & " dB"
End If
Catch ex As Exception
Return "Error"
End Try
Return retval
End Function
You can use it like this:
VB Code:
Dim myCurrentHexValue As String = "4F"
TextBox1.Text = Translate2dB(myCurrentHexValue)