Various thing may do that, but I would suggest to enable the Brown-Out detect, and Power On Timer config fuses and see how better/worst it is from there.
Various thing may do that, but I would suggest to enable the Brown-Out detect, and Power On Timer config fuses and see how better/worst it is from there.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
The schematic could help to understand better. Can you post it?
Cheers
Al.
All progress began with an idea
HI
here is the schematic:
I have tried to enable BOD, and these are results:
When I insert PIC into Board and turn the switch on, program run correctly, but when I turn the switch off and let it be offline few min, then when I turn it on it want work, BUT when I turn OFF the switch and Take out PIC from board and Plug him back to board, and turn the switch ON program runs correctly ?
So every time I Remove it from board and plug him back program works
Last edited by Archangel; - 21st May 2011 at 19:25.
Slow slope power-on/Power off PSU behaviour.
You want to test the BOR, PD bits at the start of the program then.
Check the datasheet for STATUS, PCON register
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
What is the state of all the unused and floating pins ? Are they outputs or inputs ?
If you have them set (tris setting) as input then turn them into output and clear them to zero.
Never leave inputs floating without pullup or pulldown.
Cheers
Al.
All progress began with an idea
Hmm
so I should put all my pins (register E,C ect.) that I am not using to OUTPUT
Setting them to low outputs gives them a low impedance potential. As inputs with a high impedance potential they are subject to "Stray capacitance" electric fields which typically have relatively high voltage and very low current available. If you need them as inputs, you would either enable weak pullups, tie them to either ground or VDD with resistors depending on your need, again lowering their input impedance to several hundred to a few thousand ohms, exception: If you WANT to use them as capacitor plates, maybe a touch sensor.
You might find some value here:
http://www.electronic-engineering.ch...box_keypad.pdf
http://www.electronic-engineering.ch...g/box_dbg.html
I like how they use a comparator to trigger an interrupt to check the keyboard register.
Last edited by Archangel; - 21st May 2011 at 20:04. Reason: add links
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks