View previous topic :: View next topic |
Author |
Message |
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
Controller doesn`t start without programmer?! |
Posted: Sat Oct 18, 2014 7:43 am |
|
|
Greetings. I`m using MPlab 8.91, CCS v5.025 and PIC18F67K22.
When I load the program, the microcontroller doesn`t start if the PICkit 3 programmer is not in the ICSP. It`s not in debug mode. When I turn on the power, I just have to put the PICkit into the connector and the controller starts. Otherwise it doesn`t.
Here are my fuses:
Code: |
#include <18F67K22.h>
#fuses XT,NOWDT
#use delay(clock=10M)
|
Can you tell where to look for the problem?!
Thanks! |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9244 Location: Greensville,Ontario
|
|
Posted: Sat Oct 18, 2014 7:51 am |
|
|
um....
how have you configured the _MCLR pin ??
I know silly to ask but I've been down THAT road before.....
are you powering the PIC from the PICkit instead of 'local' power?
I've done THAT as well.....
Jay |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
Re: Controller doesn`t start without programmer?! |
Posted: Sat Oct 18, 2014 8:09 am |
|
|
stoyanoff wrote: | Greetings. I`m using MPlab 8.91, CCS v5.025 and PIC18F67K22.
When I load the program, the microcontroller doesn`t start if the PICkit 3 programmer is not in the ICSP. It`s not in debug mode. When I turn on the power, I just have to put the PICkit into the connector and the controller starts. Otherwise it doesn`t.
Here are my fuses:
Code: |
#include <18F67K22.h>
#fuses XT,NOWDT
#use delay(clock=10M)
|
Can you tell where to look for the problem?!
Thanks! |
I do not use that specific PIC but the most common flaw with the PIC18F is the LVP where the fuse setting to enable LVP by default.
Try adding the fuse NOLVP _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Last edited by asmallri on Sat Oct 18, 2014 12:13 pm; edited 1 time in total |
|
|
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
|
Posted: Sat Oct 18, 2014 8:24 am |
|
|
I think this NOLVP helped!
Thanks! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Oct 18, 2014 8:53 am |
|
|
Quote: | #include <18F67K22.h>
#fuses XT,NOWDT
#use delay(clock=10M)
|
That's the wrong oscillator fuse for 10 MHz. In one of your old posts
you are using the HSH fuse (though it should be HSM for 10 MHz):
http://www.ccsinfo.com/forum/viewtopic.php?t=52538
Why did you change it to XT ?
Quote: | I think this NOLVP helped! |
18F67K22 doesn't support LVP mode. There is no LVP config bit.
There is no NOLVP fuse. Using it causes the build to fail:
Quote: |
Executing: "C:\Program files\Picc\CCSC.exe" +FH "PCH_Test.c" +DF +LY -T -A +M -Z +Y=9 +EA #__18F67K22=TRUE
*** Error 111 "PCH_Test.c" Line 2(7,23): Unknown keyword in #FUSES "NOLVP"
1 Errors, 0 Warnings.
Build Failed.
|
This was tested with vs. 5.025.
18F67K22 data sheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/39960d.pdf
What are you doing ?
Do you have MPLAB configured for the correct PIC that you are using ? |
|
|
|