$regfile = "m32def.dat" Dim A As Byte Ddra = &B1111000 'Bit4-7 Ausgang Bit0-3 Eingang Porta = &B00001111 ' Pull Ups On Ddrb = &B00000000 'PortB alle Mann auf Eingang Do Do ' pins lesen solange keine Taste gedrückt ist A = Porta A = A And &H0F Loop Until A <> &H0F If Pina.0 = 0 Then 'Auswertung Porta.4 = 1 Else if Pina.1 = 0 Then Porta.5 = 1 Else if Pina.2 = 0 Then Porta.6 = 1 Else if Pina.3 = 0 Then Porta.7 = 1 End If End If End If End If Do ' auf RESET an PINB.0 warten Loop Until Pinb.0 = 0 Porta = &H0F Loop End