Bueno tengo una duda, en esta parte del código:
loop
clrwdt
btfss GPIO,Sync ;loops while Sync=0
goto $-1
clrf TMR0 ; First half period
movf Dimmer,w
call Table ;converts the value in Dimmer to Phase
movwf Phase
La1
movf Phase,w ;compares the Phase with the timer
subwf TMR0,w ;when the time has come swithes the ouput on
btfsc STATUS,C
goto Lb1
bsf GPIO,Out ;output on
..
..
..
..
..
.
..
Lb1
movf Phase,w
subwf TMR0,w
btfsc STATUS,C
goto Lb1
bsf GPIO,Out
Solo Cuando la resta del registro Phase y el TMRO pase la bandera "C" a cero, solo se enciende el puerto OUT(2) luego si miramos que al no presionar ningun botón vuelve y apaga el triac, osea que solo dura encendido los microsegundos de los ciclos que pasan entre el BSF GPIO,OUT y el BCF GPIO,OUT ? ...tenía entendido que la teoría del dimmer era dejar pasar la parte de la señal senosoidal desde el cruce de cero(semiciclo positivo) hasta los milisegundos que variavamos antes de llegar al semiciclo negativo ...o estoy equivocado?
Gracias por la ayuda
Saludos