Re: more on weird resets
Rogier Wolff <[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.gnupic |
|---|---|
| Organization | BitWizard.nl |
| Message-ID | <[email protected]> |
On Sun, Jul 31, 2005 at 05:38:29PM +1000, John Sheahan wrote: > Peter wrote: > > > > > >On Sun, 31 Jul 2005, David McNab wrote: > > > >>Hi all, > >> > >>I dug out my old trusty veroboard-based proto board (with header pin > >>blocks for running all the ports out to breadboard). Try as I might, I > >>can't reproduce the random reset problem on that board. > >> > >>Guess I might need to do a whole new board, with all the ground traces > >>flooding out to eat all the unused board surface. > >> > >>Any further suggestions? > > what kind of decoupling capacitor are you using on the VDD supply, and > how far away? If at this point in time, you're having trouble, then finding something "on the other side" means you can start doing binary search. If there are 1000 things to try, if you try them one at a time, you'll on average find your problem after 500 tries... NOW you've found that "it works" on the different board, that means that all the software issues can be dropped. Great! 500 options to try can be dropped! Decoupling capacitor should be "as close as possible" to the chip. When I'm suspecting decoupling problems, I usually get an oldfashioned (with legs) 100n capacitor, bend the legs so that the capacitor is straight above the chip, and the legs are on the VCC/VDD of the chip. Apply a little solder, and you're done. If this works, that means that you can eliminate "MCLR problems" from your list of things that could be wrong. If it works, you are left with "how far". In this case, if you're designing the board, I'd just "do my best" to place the cap close, but not going to extremes to get it really, really as close as possible. If the "v2" board then doesn't work, you go back to the piggyback cap. If it works again, you might need a bigger cap, or closer... > >Put a 100 ohm resistor between your current circuit and MCLR and add a > >220pF cap between MCLR and VDD directly at the chip. Also add a 5V6 > >zener between VDD and VSS. > > A piece of wire would work better. In theory the 100 ohm/220pf capacitor would generate a reset pulse of 0.5 microseconds. If your VCC is quick enough. When you're in the "In theory it should work, but it doesn't" phase of a project, there is at least ONE of your theoretical assumptions that doesn't hold. Sorry. That's life. So, feel free to try this AFTER some other things, but I'd suggest you keep it in mind in case he's right... Roger. -- ** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2600998 ** *-- BitWizard writes Linux device drivers for any device you may have! --* Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement. Does it sit on the couch all day? Is it unemployed? Please be specific! Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ