BVar = 1023

blue:
shiftout d2pin, c2pin,1 [funct\1,Rvar\10,Gvar\10,Bvar\10]
gosub latch
gosub BringUpPWM
pause 100
Bvar = Bvar - 2
if bvar < 3 then goto end
gosub blue

end

I was expecting gradual dimming of the LED, but it pulsates and intensity seems the same.