Es funktioniert auf jeden Fall mit Print Bin in BASCOM. (255 = 11111111)
Warum also nicht auch mit dem LCD.
Notfalls (wenn alle Stricke reissen) vorher in einen String umwandeln und dann an das LCD senden.
Hier die Umwandlung in den String Text, welcher dann an das LCD gesendet werden kann.Code:$regfile = "m16def.dat" $crystal = 8000000 $baud = 9600 Dim Porta_zustand As Byte Dim X As Byte Porta_zustand = 0 Config Porta = Output Porta = 255 For X = 0 To 255 Porta_zustand = X Print Porta_zustand Print Bin(porta_zustand) Incr Porta_zustand Next X End
Code:$regfile = "m16def.dat" $crystal = 8000000 $baud = 9600 Dim Text As String * 16 Dim Porta_zustand As Byte Dim X As Byte Porta_zustand = 0 Config Porta = Output Porta = 255 For X = 0 To 255 Porta_zustand = X Text = Bin(x) Print Porta_zustand; Print " "; Print Bin(porta_zustand); Print " "; Print "["; Print Text; Print "]" Next X End







Zitieren

Lesezeichen