Hallo Henrik,

vielleicht kannst du mir noch einmal helfen:

Ich habe mcs.lib jetzt so geändert:
Code:
......
_pulse_in5:
  @genus(9) ; This For 10 Us Units But Approx. Depends On Xtal

  ; you can remove the above call and tailor this routine
  ; when remarked 10 cycles/ loop are needed and for 1 Mhz this is 10 uS
  ; for 4 MHz you need additional 30 cycles and the @genus can be used

  ; routine adapted for 8 MHz:
  Push r17                            ; 2 cycl.
  Ldi r17,$16                         ; waiting 66 cycl.
_pulse_in6:
  Dec r17
  brne _pulse_in6
  Pop r17                             ; 2 cycl.

  Ld r0,z                             ; 2 cycl. get pin state
  And r0, r24                         ; 1 cycl. get only the input pin state
  Eor r0,r16                          ; 1 cycl. xor with begin state returns zero if the same
  Brne _pulse_in_exit                 ; 2 cycl. ready ,state changed
  Adiw xl,1                           ; 2 cycl. counter
  brne _pulse_in5                     ; 2 cycl. again
_pulse_in_timeout:
.......
Das wird auch fehlerfrei zu mcs.lbx kompiliert, aber das Basic Programm meldet dann beim Kompilieren diverse Fehler (z.B. "ASM mnemonic not found [#ENDIF]". Ich habe sicher nichts weiter in der mcs.lib (1.11.7.6) verändert.
Nehme ich wieder die alte mcs.lib, wird das Basic Programm fehlerfrei kompiliert.
Woran kann das liegen?

Gruß Dirk