A mechanical rotary encoder allows smooth dimming of a LED-Strip, pressing the wheel switches between off-mid-max brightness. The raster of the encoder gives a nice haptic feeling when rolling the wheel. Encoder, wheel and switch originate from a mouse. The assembler source contains robust encoder routines to compensate switch bouncing.
Two options in source
.define PWLOGIC 1 ;PWM logic 0 negative 1 positive
.define ENCDIR 0 ;encoder direction 0 normal 1 reverse
Rotary encoder and mouse wheel
qrt@qland.de 220301