I have try with:
@ DEVICE BOD_OFF
but don't work.
Have you an correct sample?
May be I will need to rewrite some other times the PIC.
It's right to set LVP_ON?
I have try with:
@ DEVICE BOD_OFF
but don't work.
Have you an correct sample?
May be I will need to rewrite some other times the PIC.
It's right to set LVP_ON?
Again. You need the HS oscillator.
Since you are using an 18F, you must be using MPASM as the assembler, and MPASM uses __CONFIG instead of DEVICE.
You should probably read this thread.
Presetting Configuration Fuses (PIC Defines) into your Program
http://www.picbasic.co.uk/forum/showthread.php?t=543
NO! Bad idea, unless you have a special programmer.It's right to set LVP_ON?
<br>
DT
I routinely use the PIC 18LF4620 at 3.7 down to 2.5 volts. I run at 4 MHz and the config data I load into the Melabs USB serial programmer is:-
Do NOT enable LVP which is the short life option - you will go mad and die young trying to find intermittent programming problems.Code:'************* Config Register setup for USB programmer **************** ' OSC = HS, FSCM = En, IESO = En, PwrupTmr = En, BrownOut = Dis ' BOR Volts = 2, WDT = Off, WDTPS = 1:512, CCP2 mux = RB3, ' PortB rst = Digital, LPT1Osc = Low, MCLR = Reset, LVP = Dis ' Enhanced CPU = Dis, All memory = Not Protected ' Note re power consumption. PBP assumes the WDTPS is set to 512. ' SLEEP draws 2.5 uA in this system. Each time sleep times out there ' is a current pulse for 2.5 mSecs at 600 uA. Setting WDTPS = 1024 extends ' the SLEEP internal period by 2 and so the average power drops BUT ' PBP will get the sleep times wrong by the factor of chosen WDTPS:512 '************************************************************
Even when the WDT is disabled, the WDT post scaler is active and to get the sleep times right you must set the WDTPS to 512.
Enabling the WDT adds 2 uA to the sleep current.
Enabling the BOD also adds about 2 uA to the sleep current.
HTH
BrianT
I have change the ceramic oscillator with an quartz oscillator.
I am not shure if is an HS, but now works!
Thanks for your suggestion.
Have a nice day.
If you mean you are using an external oscillator . .
Well that is a little like buying a new car because you forgot to hook up the battery in the old one. If you mean you substituted a crystal and capacitors for a ceramic resonator, then the problem is probably still there, and you are operating at the fringe of the oscillator's ability.<br>
Config fuses, are instructions to the programmer software, you set in your code, to tell the programmer how you want the pic to do things. <b> XT, HS . . . </b> explains to the programmer what level or power to allocate to the PIC's Oscillator, the higher the frequency the oscillator operates at, the more power it requires, which is why 20mhz requires HS and 4mhz gets by with XT. Go back to Darrel's post and follow the link he posted to see how to do it. If you get stuck, come back and seek further help.
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