Using: 16F88 at 8 MHz and Darrel's interrupts (INT_INT).
Overview: I'm reading 5 different analog values and attempting to drive 5 corresponding triacs with outputs proportional to the analog voltages (forward phase-cutting). INT_INT provides the AC zero-crossing signal.
Successes so far: All blinkies have worked. I can get any one channel to do what I want, but I can't manage all five.
What I've been doing: I read the analog channel(s) in MAIN (looped), then let the interrupt handler turn on the channel(s).
One problem seems to be manipulating the analog values. If I do this in MAIN, even for a single channel, the output result is screwy, so I do it in the handler, which begins to bog it down time-wise. In the handler, I've tried loops counting up, loops counting down, and in either case it seems the killer is the conditional testing to determine when to fire the triac(s).
I'm not asking anyone to write the code for me; I've got working fragments from here to hell and back.
I'm looking for a strategy. Suggestions, please?
Bookmarks