View previous topic :: View next topic |
Author |
Message |
fedetouz
Joined: 01 Aug 2007 Posts: 14
|
MCLR pin: Can Pullup Resistor to Vdd causes problem on 18F? |
Posted: Mon Oct 08, 2007 10:01 am |
|
|
hi all!!, i have a 18F458 and the problem is on power up, the pic dont start and i need pull down to ground and them pull up to high and pic start fine. I never have this problem before. I need a quick solution!!
Thanks!! |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Mon Oct 08, 2007 10:26 am |
|
|
Since you gave us virtually NO information, a few questions:
Do you have the POR enabled?
Is this with PLL enabled?
Last edited by dyeatman on Mon Oct 08, 2007 10:28 am; edited 1 time in total |
|
|
fedetouz
Joined: 01 Aug 2007 Posts: 14
|
|
Posted: Mon Oct 08, 2007 10:28 am |
|
|
i post a fuses code, and yes POR is on, thanks!!
Code: | #include <18F458.h>
//#device ICD=TRUE
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES HS //High speed Osc (> 4mhz)
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOOSCSEN //Oscillator switching is disabled, main oscillator is source
#FUSES BROWNOUT //Reset when brownout detected
#FUSES BORV20 //Brownout reset at 2.0V
#FUSES PUT //Power Up Timer
#FUSES NOCPD //No EE protection
#FUSES STVREN //Stack full/underflow will cause reset
#FUSES NODEBUG //Debug mode for use with ICD
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOWRT //Program memory not write protected
#FUSES NOWRTD //Data EEPROM not write protected
#FUSES NOWRTB //Boot block not write protected
#FUSES NOCPB //No Boot Block code protection
#FUSES NOWRTC //configuration not registers write protected
#FUSES NOEBTR //Memory not protected from table reads
#FUSES NOEBTRB //Boot block not protected from table reads |
|
|
|
Ttelmah Guest
|
|
Posted: Mon Oct 08, 2007 10:33 am |
|
|
What voltage are you running?.
Personally, assuming you are running off reasonable voltage, I'd raise the brownout voltage setting.
The problem is probably not the MCLR pin, but that the chip is not initialising properly, when power is applied, and MCLR then allows you to recover from this. I'd suspect something like an oscillation on the supply at bootup. A high brownout setting, might recover from this.
Best Wishes |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Mon Oct 08, 2007 10:36 am |
|
|
OK, I dont see the PLL enabled in your fuses.
It sounds like maybe the power supply is slow coming up to voltage. I would suggest a 10K pullup on MCLR with a .1 cap to ground to get an external reset.
Someone else here may have a different take on the problem.
OOPS...sorry Ttelmah, I came in right after you... :-) |
|
|
fedetouz
Joined: 01 Aug 2007 Posts: 14
|
|
Posted: Mon Oct 08, 2007 10:48 am |
|
|
i have a pullup of 10K on the MCLR pin , i make a change on the fuses to 4.2v and start fine now. The problem is 4.2v its too high , my power supply works on 4.91v, margin of safety its too short , but works well.... now.
Thanks guys!! |
|
|
Ttelmah Guest
|
|
Posted: Mon Oct 08, 2007 2:34 pm |
|
|
4.2, to 4.91, is a huge safety margin, unless your supply is c**p..
I would suspect the supply is almost certainly oscillating on start up (slow rise - provided it is not too slow... - is not normally a problem, but oscillation can lead to the chip starting, and then effectively having a brownout straight away, and getting into an indeterminate state).
Realistically, you need to improve your supply, or provide a delayed bootup, by holding MCLR low for a while (while a capacitor will do this, it can cause problems, because the recovery time to discharge the capacitor is long - a diode across the pullup resistor, can be used to ensure a faster discharge). Sort of thing that causes this, is having very large input capacitors to the regulator (so the input voltage stays a long time in the region where the regulator does not work properly), combined with inadequate capacitance on the output leg (where a small capacitor close to the regulator is required by most designs to prevent oscillation).
I really would suggest if you want this to be reliable 'long term', that you look at your supply design again.
Best Wishes |
|
|
ELCouz
Joined: 18 Jul 2007 Posts: 427 Location: Montreal,Quebec
|
|
Posted: Mon Oct 08, 2007 11:36 pm |
|
|
what about using NOMCLR fuse (this disable the MCLR pin ,, if you are not using it ;) )
Last edited by ELCouz on Mon Oct 08, 2007 11:40 pm; edited 1 time in total |
|
|
fedetouz
Joined: 01 Aug 2007 Posts: 14
|
|
Posted: Mon Oct 08, 2007 11:38 pm |
|
|
I need make a little changes on my power supply!, Its linear supply of 5A.
i have a little jitter of 10mv. Works well now!.
Thanks!! again |
|
|
|