in a microcomputer with built - in sog region system debugging is made possible using a gate array provided outside the microcomputer by supplying signals transferred between a cpu and the gate array to external terminals used for transferring signals between the interior of the microcomputer and a peripheral device outside the microcomputer . in order to supply necessary signals to the gate array connected to the external terminals , a selection circuit which outputs signals between cpu and the sog region to the external terminals by means of a mode switching signal is provided . by the provision of the selection circuit , it becomes possible to output the signals between the cpu and the sog region to the external terminals by switching , and to transmit the signals of cpu to the gate array provided outside the microcomputer . accordingly , it becomes possible to debug the system using the gate array provided outside the microcomputer .