Code:DEFINE OSC 20 INCLUDE "modedefs.bas" TRISD.0=1<<<===You've set D.0 to an INPUT here!!! Might want an OUPUT! LED VAR BYTE LOOP: LED=1 : SERout PORTD.0,T2400,[LED] : PAUSE 5 : GOTO LOOP END And the Lab X2 code: DEFINE OSC 20 INCLUDE "modedefs.bas" TRISB=%00000001<<<===And here too, but this is correct LED VAR BYTE : LED=0 LOOP: PORTB.2=1 : SERIn PORTB.0,T2400,[LED] IF LED=1 THEN PORTB.1=1 ELSE PORTB.1=0<<<===Might want to turn the LED off if you don't receive anything PAUSE 100 ENDIF GOTO LOOP END
Bookmarks