Just read through that thread and the PDF in it. I only understood some of it through. Im using triacs so i cant use bi-phase angle modulation. Phase angle modulation is what i was thinking of. Turn an output on at a set point durin the half cycle and let the triac turn itself off at the next zero-crossing. I dont think the drawbacks of that method will affect me because im not using LEDs. I got completely lost at BAM.
The idea i had would work like this
Obviously i wouldnt type out hundreds of if statements, i would use a loop instead but thats what i was thinking of. It looks a little slow thoughCode:interruptpoint: 'This is where it goes on interrupt from the zero-crossing pin RB0 if brightness(0)=100 then high porta.0 endif if brightness(1)=100 then high porta.1 endif ......... pause (100th of a cycle) if brightness(0)=99 then high porta.0 endif ...... 'by now it should be right at the end of the half cycle 'set the pins to low so the triacs dont all come back on in the next half cycle low porta.0 low porta.1 resume
I know ive got to learn serial now without using serin2.
Which interrupt method do i need? (or which one should i start learning?)






Bookmarks