Is designed to store files in memory areas. The memory can be
fragmented, so some I2C EEPROMs can be used as one disk.
It is also useful for ramdisks in banked RAM or files stored in EPROM.
The MEM/0 structure was the first idea. In the MEM/1 revision, pointers to
parent was added. So now there's only one pointer needed to operate a file or
directory and there's no need to remember pointers of the path elements. This
simplifies e.g. deleting files or moving to another directory.
||"M", "E", "M", #01
||three chars followed by #00
||phisical disk name
||at least 26
||at least 26
||at least 7
||data area descriptor
First file desriptor (structure F) is always present. Points to first file
or directory on disk, contains amount of useful free space and points to the
free area chain (structures A). Also can point to parent directory - value 0
means the mount point is root. So empty disk contains the 8 bytes header, one
structure F and at least one structure A.
||pointer to next structure
||next file or directory in this directory
||length of this structure
||from 20 to 64
||from 1 to 65535
||pointer to parent structure
||the directory that contains this file or directory
||pointer to child structure
||first entry in child directory
||date and time
||at least 2
||name followed by #00
All pointer and length fields are in little Endian (the low meanig byte is
Example - empty 8kB disk
Example device is M24C64 - an I2C 8kB EEPROM, connected to
The pointer base is #E0A0, what means memory connected to AY (#E0 - bit 0
of port A is the SDA, bit 1 is SCL.) and of internal number #A0. The
connection number #E2 is used in TC2068 computerers and means bit 4 of port A
is the SDA, bit 5 is SCL. Internal number for M24C64 chips can be range
#A0..#AE (only even values) and is set with E0, E1 and E2 inputs of the chip.
addr. contents description
#0000 4D 45 4D 01 filesystem name "MEM/1"
#0004 45 45 30 00 disk phisical name "EE0" (zero ended)
#0008 F 00 00 00 00 no next directory entry (start of F struct.)
#000C 19 00 entry length (#0027-#000E)
#000E / 00 00 file entry with no flags set
#0010 00 00 00 00 no parent structure present
#0014 D3 1F 00 00 total free area length
#0018 27 00 A0 E0 pointer to A structure (starts from #0027)
#001C B5 44 22 2C time of formatting: 2002-01-02 08:37:42
#0020 45 45 44 48 disk name "EEDISK"
#0024 \ 53 4B 00 (zero ended)
#0027 A 00 00 00 00 no next structures (start of A struct.)
#002A D3 1F area length (#2000-#002D)
#002D / FF FF FF FF empty area - #1FD3 bytes
#0031 FF ...
#1FFF \ FF last byte of empty area
Files for download
- eedisk.zip 2.8kB (2002-12-20 21:08)
- Example code to access the IIC memory in TC2068.
Links to other pages
- IIC memory
- Memory connectable to IIC magistral.