> 1.) I'm using a PIC16F872. Sending the MCLR pin low on this device should > always be a hardware reset, right? There's no MCLRE config bit on this PIC, > so that pin is always MCLR, right? This means that the program counter > should go to zero, correct? Which means that if all the registers are > cleared at the beginning of the program, they should show up reset to 0x00, > right? > Refer to the datasheet for the reset status of each register. THERE IS NO SINGLE RULE!!! The safest bet, always always always, is to assume that every register on your device is anything other than you want it to be on startup or reset. In other words, the first thing you should do is reset all the registers to the desired state. > 2.) I'm making a dozen PCBs or so for this project, and so I want to make > sure all my code is right first, and especially all my hardware layouts. As > such I've been running the MPsim on everything in MPLAB IDE 6.6. I've > gotten these doubts about MCLR because I've been using the pin stimulus > function to set it low and then high (both while the program is running and > while paused -- so I don't think it's a pulse witdth problem) and nothing > seems to reset at all. > Do I have something wrong? Is this a simulator issue? A chip can't > ignore a hardware reset, can it? Do I need to breadboard this? Breadboarding is always a good idea; you can do some "virtual breadboarding", with things such as Proteus Lite. See www.labcenter-electronics.com for info. > 3.) The actual physical mechanism I have drawn up to trigger this reset is a > NO momentary pushbutton connected to ground on one side and MCLR on the > other, with MCLR tied to VDD through a 10k resistor. I've read on your list > that it's a good idea to put a 220ohm or so resistor line with the MCLR pin > -- similar to the way you'd protect the gate of a MOSFET. Is this true? Can't speak with any authority on this; however, I note the absence of a capacitor in your description which is good. After all, connecting a cap charged to 5V directly to ground is rarely a good idea. > Forgive me if these questions are silly or this post is too long. But I > sure do appreciate you taking the time to look at this and look forward to > your replies. Actually, it's good that you're asking these questions. Too many people view especially the reset portion as a trivial item, while it is, in fact, not. Mike H. _______________________________________________ http://www.piclist.com View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist