Patent ID: 8264294

Claim:
A semiconductor device comprising: a first on-chip oscillator which receives a reference current and a reference voltage and outputs a clock signal with a first frequency whose magnitude is determined by said reference current and said reference voltage; a temperature sensor which detects an ambient temperature of said first on-chip oscillator; a voltage sensor which detects a value of an operating voltage of said first on-chip oscillator; a power supply module which includes a reference circuit for generating a primary reference voltage and generates said reference voltage, said reference current, and the operating voltage of said first on-chip oscillator, based on the primary reference voltage which is output by said reference circuit; a storage unit which stores a table specifying trimming codes for said reference voltage and said reference current, related to an ambient temperature of said first on-chip oscillator and an operating voltage of said first on-chip oscillator; and a logic unit which reads trimming codes for said reference voltage and said reference current, the trimming codes being related to the detected ambient temperature and operating voltage, and adjusts the values of said reference current and said reference voltage, according to the read trimming codes.