On Sun, 1 Feb 1998, Andy Shaw wrote: > Now for > the odd part I found that by simply adding a few nops to the loop in my code > I get get rid of the glitching. What I don't understand is why. The code I > have does not change the state of any external pins it simply runs waiting > for an interrupt on change from portb and maintains a few time related > internal state variables. I'm surprised that changing the length of the main > loop with this sort of code would change the nature of any RF noise being > generated by the PIC! So can anyone explain? It sounds like you don't have a good enough capacitor across the power pins of the PIC or the capacitor is too far away. I recently made the mistake of having the capacitor too far away from the PIC's Vdd and Vss. Without the capacitor in the right place, I saw lots of high frequency noise on the power lines. I only have a 20 Mhz oscilliscope. There was certainly noise at 20 Mhz. I assume that there was probably a fair amount of noise at 40 Mhz, but my scope can't show that. I didn't experiment to see how the noise correlated with the running program. > Oh and can anyone offer any advice on the best way to isolate PIC based > projects that are used with RC equipment (given that they probably need to > share a power supply and take input(s) from the RC gear)? If possible give each part of the circuit its own voltage regulator. So, isolate the power supplies as much as is practical. -- paulh@hamjudo.com http://www.hamjudo.com The April 97 WebSight magazine describes me as "(presumably) normal".