root/lm-sensors/trunk/prog/eepromer/README.eeprom @ 1360

Revision 1360, 3.4 KB (checked in by mds, 13 years ago)

add small eeprom reader/writer from

Christian Vogel <chris@…>;
combined the Makefile with eepromer.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
1You can use this program to read/write to i2c-eeproms
2like the popular 24C16, 24C08, 24C04,.. In contrast to lm_sensor's eeprommer
3which supports 24C256-type eeproms 24C16ss use 1-byte addresses!
5!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6!!!                                                                           !
7!!! This program should only be used on external busses such as i2c-pport.    !
8!!!                                                                           !
9!!! Your computer may contain i2c-eeproms for saving data vital to its       !
10!!! operation. If you are not careful you might overwrite this data with      !
11!!! this program and your computer may no longer boot!                        !
12!!!                                                                           !
13!!! An example are the EEPROMS on your SDRAM DIMMs, your computer may no      !
14!!! longer detect the RAM module rendering it essentially USELESS!            !
15!!!                                                                           !
16!!! IBM Thinkpads are said to store their configuration data in a eeprom,     !
17!!! if you manage to overwrite this eeprom you will have to send your         !
18!!! computer to the manufacturer for a costly repair!                         !
19!!!                                                                           !
20!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
22It has several options:
24        -d devicenode
26                set this to the device-node of the i2c-bus
27                you want to use like /dev/i2c-0.
28                Use /dev/i2c-1 for the second bus, i2c-2 for the third...
30                The default /dev/i2c-0 should work most of the time.
32        -a address
34                set this to the device-address of your
35                eeprom. For a 24C16 the address is hardcoded to
36                0x50, which is -you guessed it- the default.
38                For a 24C08 and smaller types you can choose which
39                addresses they occupy by forcing the address-pins
40                of the chip to High or Low so here the address may differ.
42        -p number_of_pages
44                set this to the number of pages you want to read
45                from or write to the eeprom. The 24C16 maps it's
46                pages to consecutive addresses on the i2c-bus so
47                we will try to read 256 bytes from every i2c
48                address between 'address' (inclusive) and
49                'address + number_of_pages' (exclusive)...
51                A 24C16 has 8 pages so that's the default for this
52                parameter.
54        -f filename
56                read data from this file (when writing to eeprom) or
57                write data to this file (when reading from eeprom).
59                When reading a file that's smaller than the
60                eeprom's storage size we will pad the eeprom
61                with zeroes.
63                If no file is given we will just read the
64                eeprom (while in read-mode) and test it's presence
65                this way. In write-mode we will just write zeroes
66                to the eeprom.
68        -w      When '-w' is present we will *write* to the eeprom.
69                If you do not specify '-w' we will read the contents
70                of the eeprom.
72        -y      This flag will suppress the warning when you write to the
73                eeprom. You will not be required to enter 'yes' so be careful
74                when using this switch!
77I wrote that program to clear a 24C16 eeprom that sit's in my crappy
78satellite receiver because sometimes its Z80 processor likes to
79write garbage to it and then crash....
81No further testing besides writing a long series of "The quick brown
82fox jumps over the lazy dog!" and reading it back has been done so
83of course this comes without any warranty.
85        Chris <>
Note: See TracBrowser for help on using the browser.