Hi, I tried the following first:
Code:
INTEDG  VAR OPTION_REG.6
; ...

ACDetect:
    if triacdelay != 8000 then triac = 0 
    if triacdelay > 0 then
        if triacdelay=8000 then
            triac=1 ' Activate TRIAC
        else
            maxdelay=8000-triacdelay
            pauseus maxdelay
            triac=1
        endif
    else
        triac=0
    endif

    INTEDG = !INTEDG
@ INT_RETURN
RESULT: The bulb attached to the output did not responded to the change in triac delay value, it just kept glowing at the same intensity.

Then I experimented a little and came up with the following:
Code:
while 1

pause 3000
high buz: pause 500 : low buz
triacdelay=8000     : pause 15000 :high buz: pause 50 : low buz 
triacdelay=7998     : pause 15000 :high buz: pause 50 : low buz 
triacdelay=7950     : pause 15000 :high buz: pause 50 : low buz 
triacdelay=7900     : pause 15000 :high buz: pause 50 : low buz
triacdelay=7850     : pause 15000 :high buz: pause 500 : low buz
triacdelay=0        : pause 12000

wend


ACDetect:
;    if triacdelay != 8000 then triac = 0 
    if triacdelay > 0 then
        if triacdelay=8000 then
            triac=1 ' Activate TRIAC
        else
            maxdelay=8000-triacdelay
            pauseus maxdelay
                triac=1
                pauseus 50
                triac=0
        endif
    else
        triac=0
    endif

    INTEDG = !INTEDG
@ INT_RETURN
RESULT: The bulb responded to the changing value of triac delay, at value of 8000 it goes full bright which is normal BUT when at first lower value than 8000, it dims quiet a lot. I want it to dim a only a little at first step. I even tried 7998 after 8000 but no luck i.e. 2 uS delay.