Got it !!!
Hi, Reven
Just understand what the interrupt routine does instead of should have done ...
""
' ACDetect
' --------
'
' Interrupt routine called by ACLine (GP4) pin state change
'
disable
ACDetect:
if ACline==1 then ' Check for rising edge of AC signal
if triacdelay > 0 then
Triac=1 ' Activate TRIAC
Alain's : ;;; No,No,No ... here we have to wait for ( Maxdelay - Triacdelay ) !!! THEN fire the Triac for, say, 20µs ... then let things quiet.
if FullBright==0 then ' In case Brightness flag is not set
pauseus triacdelay ' do the selected delay
triac=0 ' Disable TRIAC
endif
else
triac=0
endif
endif
INTCON.0=0 ' Clear GPIF (interrupt on GP4 change)
resume
enable
""
*** This part of program smells to have been taken from a heather using burst mode dimming ...
Sorry, Steve ... je t'aimais bien ( avec la musique de circonstance ... )
Alain
Last edited by Acetronics2; - 13th December 2005 at 12:15.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks