View previous topic :: View next topic |
Author |
Message |
Franck26
Joined: 29 Dec 2007 Posts: 122 Location: Ireland
|
18F4620 not starting |
Posted: Tue May 20, 2008 3:35 am |
|
|
Hello everybody,
I have some problems to start a 18F4620.
Everything is working fine in debug mode, but when I try to make it working without the ICD, it simply not starting...
The config that I use when I'm not in debug mode is the following:
Code: | #include <18F4620.h>
//#device ICD=TRUE
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOIESO //Internal External Switch Over mode disabled
#FUSES BROWNOUT //Reset when brownout detected
#FUSES BORV28 //Brownout reset at 2.8V
#FUSES PUT //Power Up Timer
#FUSES NOCPD //No EE protection
#FUSES STVREN //Stack full/underflow will cause reset
//#FUSES DEBUG //Debug mode for use with ICD
#FUSES NODEBUG
#FUSES LVP //Low Voltage Programming on B3(PIC16) or B5(PIC18)
#FUSES NOWRT //Program memory not write protected
#FUSES NOWRTD //Data EEPROM not write protected
#FUSES NOEBTR //Memory not protected from table reads
#FUSES NOCPB //No Boot Block code protection
#FUSES NOEBTRB //Boot block not protected from table reads
#FUSES NOWRTC //configuration not registers write protected
#FUSES NOWRTB //Boot block not write protected
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES NOPBADEN //PORTB pins are configured as digital I/O on RESET
#FUSES LPT1OSC //Timer1 configured for low-power operation
#FUSES MCLR //Master Clear pin enabled
#use delay(clock=8000000) |
There is a pull-up resistor of 47k MCLR pin and no external oscillator.
Thanks for any help,
Franck. |
|
![](templates/subSilver/images/spacer.gif) |
RLScott
Joined: 10 Jul 2007 Posts: 465
|
Re: 18F4620 not starting |
Posted: Tue May 20, 2008 5:24 am |
|
|
What evidence do you have that it is not starting? Did you put a simple infinite loop at the beginning with some output toggle in the loop?
Also, unless you really need it, you should disable LVP. It can cause start-up trouble.
Robert Scott
Real-Time Specialties |
|
![](templates/subSilver/images/spacer.gif) |
Franck26
Joined: 29 Dec 2007 Posts: 122 Location: Ireland
|
|
Posted: Tue May 20, 2008 6:11 am |
|
|
Thanks RLScott,
You are right, the problem was the LVP.
It's starting fine now.
Thanks,
Franck. |
|
![](templates/subSilver/images/spacer.gif) |
|