hi,

ich werde mir das gleic mal durch arbeiten aber ich habe da jetzt noch was anderes gemacht ich habe micro basic for AVR von mikroelektronika genommen das da war ein bsp für butons und das ist auch mit if das habe ich comp... und mit AVR studio in den mega 8 gebrannt und das funkt richtig gut

Code:
program Led_Blinking1_avr_mega_8

main:
  DDRC  = $FF   ' PORTC to be output
  PORTC = $00   ' Turn off the led on PORTC
  PortB = $00


  while TRUE
    if Button(PORTB, 0, 100, 0) = TRUE then ' if button on PORTB.0 is 5v for 100ms
        PORTC = $01                        ' then turn on LED on PORTC.0
    end if
    if Button(PORTB, 1, 100, 0) = TRUE then
        PORTC = $02
    end if
    if Button(PORTB, 2, 100, 0) = TRUE then
        PORTC = $04
    end if
    if Button(PORTB, 3, 100, 0) = TRUE then
        PORTC = $08
    end if
  wend
end.
end.
also Bascom hat irgend wie ein problem mit mir.oder so