writing into EEPROM textmessages via I2c

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

writing into EEPROM textmessages via I2c

Jump to solution
1,608 Views
matthiasebert
Contributor I

I am using NT3H1101 together with android NFC "tools" app version 4.2 to write Text-message (numbers) with maximal length of 3 digit (3 byte). This is working well: i am able to write and read via the NFC tool app.

But if a change one or two digit of the message text using I2C programming to EEPROM the bytes are changed in the EEPROM, but if i read back with nfc app only the number which i had programmed via nfc app will be read out.

Following is the content of the eeprom block beginning with address 01H (I2C eeprom mem) after writing via RF and android app "nfc-tool" (the data i read back via I2C into microcontroller for checking): all data in Hex

03 08 d1 01 04 54 02 65 6e 31 32 FE 00 00 00 0f

This is showing text on android nfc app: 12 ;;Byte 9 is ASCII 1; Byte 10 is ASCII 2;

Now i change Byte 10 to ASCII 3 which means 33h

I write thi via I2C and read back for control via I2C block beginning at address 01 successful.

03 08 d1 01 04 54 02 65 6e 31 33 FE 00 00 00 0f

If i read now the contenet with the android app the text 1 only is displayed. I expected the 13 because i changed in EEPROM second number (at byte position 10) from old 2 to 3.

What i have to do or to check that i can change ASCII text in EEPRO via I2C and this text complete read via RF interface android app back?

0 Kudos
1 Solution
1,454 Views
matthiasebert
Contributor I

Kan,

in case of changing number of ASCII signs the Android smartphone reads only the first stored sign. This sign i could change and was right read out.

I solved the problem now by analyzing memory:

On memory position 2 there is following stored: (ASCIIdigit nr +7) ; means nr of ASCII signs + offset 7 is stored.

And at memory position 5 has to put in: (ASCIIdigit nr +3).

for instance:

to display text "23" with smartphone NFC reader the first memory block contains:

03 09 d1 01 05 54 02 65 6e 32 33 FE 00 00 00 00

to display text "345" with smartphone NFC reader the first memory block contains:

03 0a d1 01 06 54 02 65 6e 33 34 35 FE 00 00 00

Matthias

View solution in original post

0 Kudos
2 Replies
1,454 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Matthias,

If only text 1 was read back after you changed EEPROM via I2C, that means at least it didn't read back ASCII 2 , right? Do you know what data it read in that case? That might help us to analyze.

Thanks for your patience!


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,455 Views
matthiasebert
Contributor I

Kan,

in case of changing number of ASCII signs the Android smartphone reads only the first stored sign. This sign i could change and was right read out.

I solved the problem now by analyzing memory:

On memory position 2 there is following stored: (ASCIIdigit nr +7) ; means nr of ASCII signs + offset 7 is stored.

And at memory position 5 has to put in: (ASCIIdigit nr +3).

for instance:

to display text "23" with smartphone NFC reader the first memory block contains:

03 09 d1 01 05 54 02 65 6e 32 33 FE 00 00 00 00

to display text "345" with smartphone NFC reader the first memory block contains:

03 0a d1 01 06 54 02 65 6e 33 34 35 FE 00 00 00

Matthias

0 Kudos