View previous topic :: View next topic |
Author |
Message |
championx
Joined: 28 Feb 2006 Posts: 151
|
18F67J50 question |
Posted: Mon Dec 11, 2017 10:51 am |
|
|
Hi! I'm developing a board with a 18F67j50, the board works ok, but only connected to the pickit2.
If i disconnect the pickit2 and then power the board, it doesn't start the program...
It could be some fuse config?
compiler 5.045
fuses and config:
Code: |
#include <18F67J50.h>
#device PASS_STRINGS = IN_RAM
#fuses INTRC_PLL
#fuses NOWDT
#fuses NOIESO
#fuses NOXINST
#fuses NOSTVREN
#fuses FCMEN
#fuses NOPROTECT
#fuses NODEBUG
#device ADC=16
#use delay(internal=48MHz)
#use rs232(baud=9600,parity=N,xmit= pin_C6,rcv= pin_C7,bits=8)
|
Any advice? thanks! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Mon Dec 11, 2017 11:37 am |
|
|
How are your writing the program?.
Not possibly using MPLAB?.
If so, beware that this will default to enabling the DEBUG, unless you tell it to compile for 'release'. |
|
|
championx
Joined: 28 Feb 2006 Posts: 151
|
|
Posted: Mon Dec 11, 2017 11:39 am |
|
|
Thanks for your answer, no, im writing it using pickit software, no debug function. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Mon Dec 11, 2017 12:17 pm |
|
|
What is connected to the MCLR line?. The programmer will hold this high, with this disconnected, if it is floating, the chip won't start. |
|
|
championx
Joined: 28 Feb 2006 Posts: 151
|
|
Posted: Mon Dec 11, 2017 4:48 pm |
|
|
It has a 4k7 resistor to 3.3v and a diode.
3.3v ---/\/\/\/\---|>|---- MCLR PIN. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Tue Dec 12, 2017 2:35 am |
|
|
OK. It all looks good.
Are you sure the PICKIT is setup to overwrite the fuses?.
You behaviour has all the marks that the chip still thinks it is in debug mode. The question is 'why'.
Look at the end of the .LST file to see the actual fuse setup.
Then read these back from the chip.
Do they match?. |
|
|
championx
Joined: 28 Feb 2006 Posts: 151
|
|
Posted: Tue Dec 12, 2017 8:13 pm |
|
|
Thanks Ttelmah, but i discovered the problem, it was the voltage regulator...
It seems that the Pickit helped with the current and was able to start running.
Changed the regulator and Voila. Seems like it was defective...
Thanks ! |
|
|
|