Abstract: A data writing method for an EEPROM in an electronic device is performed by a writing device. The electronic device includes a system unit generating a system voltage and a write-protection voltage. The writing device includes a processor stored with data to be written, and connected electrically to a connector with the same interface as that of an expansion connector of the electronic device. When the connector is connected electrically to the expansion connector, the processor generates a write-enable voltage greater than the system voltage upon receipt of the system voltage from the electronic device, and outputs the write-enable voltage to the system unit. The system unit raises the system voltage in response to the write-enable voltage such that the write-protection voltage is smaller than the raised system voltage to thereby enable the EEPROM to operate in a write state, where the processing unit writes the data into the EEPROM.