??? 11/25/04 06:26 Read: times |
#81884 - Real -time problems Responding to: ???'s previous message |
Prahlad, You need to remove yourself from the problem for a little while. Relax , go for a walk. What changes between your simple test code and the interrupt driven code? Try to think of ways that you can prove/disprove certain elements. Does the interrupt code try to fire at the same angle as your simple test code? Make sure you're comparing apples with apples! Have your test code fire at 90degrees. Also remember thatt your test code is sampling the zero cross more accurately than the interrupt code +/- 100uS may not seem like too much but it can mean the difference between working at not working. Use your scope to compare the difference in timing between test code and interrupt code - look closely at the firing times in relation to the mains waveform. Make sure your trigger pulses aren't running too close to the next zero crossing. Is the flickering consistant? Is the flickering only on a particular half phase? Try to look for evidence. Look carefully at the waveforms you're seeing on the scope. Over the years I've many difficult problems. It all comes down to look for evidence and proving/disproving things. Never assume anything! Everything is guilty until proven innocent! |