This code doesnt work: I keep getting an assignment error
[code:1:d35fb22d1e]
Sub Numtoseg(byval Numval As Byte) As String * 3
Dim Returndata As String * 3
'Santech Register:
'Bit 0 = D
'Bit 1 = C
'Bit 2 = B
'Bit 3 = A
'Bit 4 = Empty
'Bit 5 = F
'Bit 6 = E
'Bit 7 = G
Select Case Numval
Case 0
Returndata = "6F"
Case 1
Returndata = "06"
Case 2
Returndata = "CD"
Case 3
Returndata = "8F"
Case 4
Returndata = "A6"
Case 5
Returndata = "AB"
Case 6
Returndata = "EB"
Case 7
Returndata = "0E"
Case 8
Returndata = "EF"
Case 9
Returndata = "AF"
Case 10 'enable Bit 4 for half-digit
Returndata = "7F"
Case 11
Returndata = "16"
Case 12
Returndata = "DD"
Case 13
Returndata = "9F"
Case 14
Returndata = "B6"
Case 15
Returndata = "BB"
Case 16
Returndata = "FB"
Case 17
Returndata = "1E"
Case 18
Returndata = "FF"
Case 19
Returndata = "BF"
Case Else
Returndata = "00"
End Select
Numtoseg = Returndata
End Sub
[/code:1:d35fb22d1e]
Any ideas?
[b:d35fb22d1e][color=red:d35fb22d1e](BASCOM-AVR version : 2.0.7.6 )[/b:d35fb22d1e][/color:d35fb22d1e]
↧