Programmable dimming device and illuminator using the same

The utility model discloses a programmable dimming device and an illuminator using the same. The programmable dimming device comprises a detection unit and a control unit, wherein the detection unit is used for detecting the time series of connection and disconnection of the circuit; the control unit is used for controlling a lamp to switch between different dimming modes and a programmable mode detecting according to the time series of connection and disconnection detected by the detection unit; and the control unit is configured to set the dimming parameters of a lamp under the programmable mode according to the time series of connection and disconnection.