Patent ID: 8639905

Claim:
A microcontroller comprising: a CPU; a plurality of peripheral modules; a memory map register; a peripheral write data comparison circuit; and a peripheral write data comparison requesting circuit, the microcontroller carrying out control of an external device by accessing the plurality of peripheral modules based on an instruction processing from the CPU, wherein when an access request from the CPU occurs, it is confirmed in the peripheral write data comparison requesting circuit whether the access request is a write data request, if it is the write data request from the CPU, the access request from the CPU is sent to the peripheral write data comparison circuit, and write data is sent to the peripheral write data comparison circuit twice, and wherein the peripheral write data comparison circuit inputs the write data sent first and the number of writes thereof to the memory map register, and compares the write data sent second with the write data sent first stored in the memory map register, and if they match, the peripheral write data comparison circuit transfers the write data to the peripheral module.