The invention relates to a
microcontroller (MC) having at least one device (G) for generating pulse-width modulated or frequency modulated control signals for a switched-mode power supply. According to the invention, this device (G) has a device (SQ1, SS1) for the alternate charging and discharging of an
electric charge store (C27) that can be connected to the
microcontroller (MC), control means for this device (SQ1, SS1) for controlling the charging and discharging operations, and evaluation means in order to evaluate the time periods which are needed for the individual charging and discharging operations; to generate pulse-width modulated or frequency modulated control signals. The
microcontroller (MC) according to the invention generates finely graduated, frequency modulated or pulse-width modulated control signals which are independent of the
operating cycle frequency of the microcontroller (MC). The invention further relates to a switched-mode power supply having such a microcontroller (MC) and an electronic
ballast for operating at least one electric lamp, and also to an operating method for electric lamps. The frequency modulated or pulse-width modulated control signals for the
inverter transistors (V2, V3), for the step-up converter
transistor (V1) and for the
transistor (V4) of the lamp
electrode heating device of the
ballast are generated directly by the microcontroller (MC).