Maybe this one will help you.
I donīt try before working with SERIN2 but give it a try. You can change this part with storing data to eeprom too. Itīs only to see how to realize that, if iīm not wrong.
To store data on eeprom use
DATA @$00,$D7,$7C,$4B,$02,$2D,$C9,$80,$3A,$C4,$72
Code:Loop VAR BYTE ReadTag VAR BYTE[2] ConvTag VAR WORD Tag VAR WORD[5] Tag(1) = $D77C Tag(2) = $4B02 Tag(3) = $2DC9 Tag(4) = $803A Tag(5) = $C472 ' -----[ Program Code ]---------------------------------------------------- Main: LOW PORTB.3 ' activate the reader SERIN2 PORTB.2, T2400, [WAIT($0A,"100050"), STR ReadTag\2] HIGH PORTB.3 ' deactivate reader Check_List: ConvTag = ReadTag(0)*$100 + ReadTag(1) FOR Loop = 1 to 5 IF ConvTag = Tag(Loop) THEN Tag_found NEXT Loop GOTO Bad_Char Bad_Char: ' try next tag '.... '.... GOTO main Tag_Found:




Bookmarks