At 03:02 PM 2/20/2015, Josh Koffman wrote: >Hi all, > >I'm working on a design for the 18F25K22. Normally I like to dedicate >my PGD/PGC pins to ICSP usage only. I also generally use external >MCLR. > >However, I'm really short on pins. 3 pins actually. I know I can use >PGD/PCG in circuit. I've never used them as inputs though. I realize I >will probably have trouble actually using the switches assigned to >them while debugging, but any other snafus? How do I provide for the >possibility that the switch might be closed, pulling the pin to ground >when I need to program/debug? Use a series resistor between the PIC pin and switch pull-up resistor=20 / switch contact node. Yeah - your system will ignore the switch=20 while debug is going on. You will have to work around that issue. >And how about an LED indicator on MCLR/RE0. Good or bad idea? Seems >like it should be ok, but I wanted to check to be sure. I haven't used this particular PIC but on the PICs that I do use=20 (PIC16F family), MCLR is input only. It won't drive a LED. But: you=20 can simply swap one of your switches onto MCLR if needed. Again, the=20 series resistor will isolate the pin from your switch. dwayne --=20 Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax www.trinity-electronics.com Custom Electronics Design and Manufacturing --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .