
Originally Posted by
Bruce
Are you sure you're programming your tag numbers in EEPROM at burn time? You should be
able to read back the .hex after programming to check.
I donīt wrote the code before for storing on eeprom.
But maybe this could work
Code:
DATA @$00, $D7, $7C, $4B, $02, $2D, $C9, $80, $3A, $C4, $72
Loop VAR BYTE
ReadTag VAR BYTE[2]
Tag VAR WORD[5]
TmpTag VAR BYTE[10]
ConvTag VAR WORD
' -----[ Program Code ]----------------------------------------------------
FOR Loop= 0 TO 9 ' Reading Data from EEprom Adr: $00 -$09
READ Loop,TmpTag(Loop)
NEXT Loop
Main:
LOW PORTB.3 ' activate the reader
SERIN2 PORTB.2, T2400, [WAIT($0A,"100050"), STR ReadTag\2]
HIGH PORTB.3 ' deactivate reader
Check_List:
FOR Loop = 0 TO 8 STEP 2 ' Calculate Word from HighByte + LowByte
Tag(Loop/2) = TmpTag(Loop)*$100+TmpTag(Loop+1)
NEXT Loop
ConvTag = ReadTag(0)*$100+ReadTag(1) ' Conversion of ReadTag to WORD
FOR Loop = 0 TO 4 ' Compare if ReadTag compares to Database in Eeprom
IF ConvTag = Tag(Loop) THEN Tag_found
NEXT Loop
GOTO Bad_Char
Bad_Char: ' try next tag
'....
'....
GOTO main
Tag_Found:
Error corrected... Sorry
Bookmarks