Patent ID: 8650441

Claim:
A data programming circuit, comprising: a one-time-programmable (OTP) memory; and a control unit, storing a plurality of sections of a read-only memory (ROM) code into a free space of the OTP memory, and storing a specific address into the OTP memory in response to the sections of the plurality of sections that have the same content, wherein the control unit encodes the ROM code and determines whether the free space of the OTP memory is capable of storing the encoded ROM code, and when the free space of the OTP memory is capable of storing the encoded ROM code, the control unit writes a start address and an end address of the free space of the OTP memory, into a stack section of the OTP memory according to the encoded ROM code, wherein the control unit stores the encoded ROM code into the free space of the OTP memory when the start and end addresses have been written into the stack section successfully.