The invention relates to a current-adjustable and PWM flicker control constant-current driving circuit, which comprises a power supply and protection circuit (1), an LED or LD module (2), an MCU control circuit (7), a constant-current driving and current sampling circuit (3), a reference voltage setting circuit (4), a current setting and flicker control circuit (5) and a feedback and compensationcircuit (6). The constant-current driving and current sampling circuit is used for realizing adjustment of current output. The reference voltage setting circuit is used for setting reference voltageof the output current. The current setting and flicker control circuit is used for setting a pulse or a constant current value and setting frequency and pulse width. The feedback and compensation circuit realizes current feedback and dynamic compensation of the system, achieves the purpose of stabilizing current output, and has the effects of improving the rising speed of output current and widening the width of the output current. According to the invention, the constant current or pulse current of the LED or LD module can be adjusted, PWM adjustment and flicker control of the pulse current can be carried out, and the requirement of constant current driving in an LED light source and an LD laser system in a machine vision system can be met.