Code:PORTA = 1 PORTB = 0 KEY VAR BYTE KEY1 VAR BYTE ADR VAR BYTE SYMBOL SCLK = PORTB.0 SYMBOL SDAT = PORTB.1 SYMBOL RELY = PORTB.3 SYMBOL STRT = PORTA.0 START: IF STRT = 0 THEN GOSUB SCAN ENDIF GOTO START SCAN: FOR ADR = 0 TO 7 I2CREAD SDAT,SCLK,$A0,ADR,[KEY] PAUSE 10 READ ADR,KEY1 PAUSE 10 NEXT ADR IF UNLCK = 0 THEN I2CWRITE SDAT,SCLK,$A0,ADR,[KEY1] PAUSE 1000 IF (KEY = KEY1) THEN HIGH RELY PAUSE 1000 LOW RELY ENDIF RETURN END DATA @0,14,21,47,56,02,11,22,33 this is wat i have in the external eeprom 24c02 "14,21,47,56,02,11,22,33 the same data i want my code to compare it.when it similare with the internal data it toggle relay or led if not similare it dont please help this wat i want to do but im sure there another way bcz this isnt working it does compare sometimes even the data not similare it toggle the led IF (KEY = KEY1) THEN
Bookmarks