Whenever necessary, before starting a new project, I build these cute little prototyping cards with lots of sockets and headers so that I can patch-plug arbitrary I/O pins to LEDs, pots, switches and off-board connectors. I built a 28-pin version today, and tested it with a pre-programmed 16F873 that doesn't just blink LEDs, it uses hardware and software PWMs to ramp brightnesses up and down, with brightness limits and ramp rate set by reading voltages set by pots on A/D channels. In preliminary tests this board checked out OK, so I finished up by replacingthe VSS/VDD jumpers to the PIC with soldered connections, wiring up the ICSP pins to the programming header, replacing the jumper connections from the oscillator sockets (an 8-pin and a 14-pin) to the PIC with wire-wrap connections, and generally cleaning things up. Naturally, I re-tested the final edition. Which went well, except for the fact that it looked like only the one LED patched to the hardware PWM port lights up. The LEDs connected to software PWMs look dark. The LED connected to the pin that toggles when the "processor idle" routine is called is lit at the expected 50% intensity. Hmm. To make sure that I haven't blown the micro, I put it and the 20 MHz oscillator can in another, similar board, and fire it up. Everything works fine. I check the connections on the new board, re-install the PIC and try again. This time, all is well -- all the LEDs pulse as expected. Then I notice that I put in a 4 MHz oscillator can instead of the 20 MHz oscillator that was there originally, so I power the unit down and change oscillators. Upon power-up, only the hardware PWM and idle LEDs light up. Changing back to 4 megs makes everything work as expected. Stuffing about with the card some more, I determine that the software-PWM LEDs actually are lighting up -- at about 5% of normal brightness. Plus, if I plug/unplug them while the software is running, they do briefly flash to full brightness. And about once or twice every ten seconds, they will emit a very brief pulse. Except with a 4 MHz oscillator, in which case all things function exactly as expected. Hooking a logic analyzer up with the 20MHz can installed, I see that if I don't have an LED load on the software PWM pins, they show the expected waveforms. Plugging in the LED load, I see a narrow pulse every now and again, but nothing like normal. Cue "Plan Nine From Outer Space" sound effects. Eventually, I found the root cause of the problem... -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist