PDA

View Full Version : I2C Smart Card memory



Ioannis
- 25th December 2015, 11:23
Usually I2C EEPROM's have defined address and this is found on the Data sheets.

But I cannot find such data sheet regarding the Smart Card type I2C EEPROMS. Also on the cards there is no indication of the manufacturer.

Any ideas?

Ioannis

pedja089
- 25th December 2015, 11:54
Try to scan all addresses.
Something like this

FOR i = 0 TO 255
Adr VAR BYTE/WORD depending on memory size expected
ADR=10
I2CWRITE datapin,clock,i,Adr,[123]
PAUSE 10
TestByte=0
I2CREAD datapin,clock,i,Adr,[TestByte]
IF TestByte=123 THEN
Write 0,i
END
ENDIF
NEXT i
And after few seconds read eeprom of PIC, Or you can use serout to show address on PC, etc...
I guess it should be $A0.
Can you post picture of smart card, so someone can recognize it and find internal schematic?

Ioannis
- 25th December 2015, 13:36
Thank for the reply.

Sure I will post a picture, but it is a classic blank card.

May be the chip is recognizable.

8135

Ioannis

pedja089
- 25th December 2015, 13:47
It looks like there is more than just eeprom in card.
http://www.cdrinfo.com/Sections/News/Details.aspx?NewsId=23488

Ioannis
- 25th December 2015, 23:07
OK, I tried $A0 and sure seems that this is the correct value.

But, there is another issue.

Writing say 1024 bytes and doing write/verify is succesful, if power is cycled, the read data is wrong and the same value. Either 16,255 or 0.

Ioannis

aerostar
- 27th December 2015, 10:37
Many moons ago I bought some of the blank memory cards, and I THINK I got them from.........Crownhill !!!

Perhaps you could drop Lester a line and see if they did supply these cards at one time.

I never did get round to using them, but I did write on one card the pinout, but nothing about the address and I cannot see in my pdfs any data sheet for these.

C1 5v , C3 SCL, C5 GROUND, C7 SDA. C2,C4,C6,C8 NO CONNECTS.

From what I remember, the memory inside was 24lc16, and there are 8 banks of 256 bytes, so if your card is the same you have to write in blocks of upto 256 per block then change to next bank.
The control I use for 24LC16
RBANK0 CON %10100000 'CONTROL CODE OF MEM IC FIRST 256BYTES
RBANK1 CON %10100010
RBANK2 CON %10100100
RBANK3 CON %10100110
RBANK4 CON %10101000
RBANK5 CON %10101010
RBANK6 CON %10101100
RBANK7 CON %10101110

Also remember the need for pullups.

Ioannis
- 27th December 2015, 11:04
Thanks for the info.

The card that I post a photo seems to respond correctly as an 64K address EEPROM.

I write and read just fine. Only when I cycle its power, the date is lost.

It has to do I think with the page write but cannot find a way to control that.

Ioannis

pedja089
- 27th December 2015, 12:12
For test, try to write single byte every time, and wait 5ms, between each write.
That would eliminate page write issue.

Ioannis
- 27th December 2015, 12:16
As long as the power is on, data appears to be written.

Including the one byte test. But if card is removed and re-inserted, data gets lost.

Ioannis

pedja089
- 27th December 2015, 12:50
Then that doesn't have anything with page write.
Just guessing, maybe there are only some serial number permanently stored in eeprom, and other location are unimplemented?

Ioannis
- 27th December 2015, 19:53
It is very bizzare that it seems to write succesfully in every location for as long as the power is ON.

I'll some more tests and report back.

I have also available a couple of SLE4442 but have never tried that for writing.

Ioannis