View previous topic :: View next topic |
Author |
Message |
eric
Joined: 16 Sep 2003 Posts: 21
|
PIC18F86J65 Programs ok - but Osc will not start |
Posted: Tue Feb 03, 2009 9:25 pm |
|
|
For this 3.3V project to get a few extra I/Os I've used the PIC18F86J65 Ethernet chip rather than the 67J60 (that does work). On the proto I've got all the Vcc, Vss pins (exactly the same set off pins on the 67J60 but in slighly different locations of course). Along with Vdcore - I get my 2.5V ok
However, although the chip is detected, program loads, and I can read back config bits. But clock does not start.
I've tried external clock. No luck.
Check the pinout many times.
It could well be something I've over looked - Any one else use this chip with better results?
Fuses
Code: | #include <18F86J65.h>
//#include <18F67J60.h>
#FUSES NOWDT //No Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES HS //High speed Osc
#FUSES NOXINST //Extended set extension and Indexed Addressing mode enabled
#FUSES STVREN //Stack full/underflow will cause reset
#FUSES NOPROTECT //Code not protected from reading
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES IESO //Internal External Switch Over mode enabled
#FUSES PRIMARY //Primary clock is system clock when scs=00
#FUSES ETHLED //Ethernet LED enabled
#use delay(clock=25MHZ, oscillator=25MHZ) |
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Feb 04, 2009 2:05 am |
|
|
Describe your external crystal or oscillator circuit. Give component
values. Tell which one of those two you are using. |
|
|
eric
Joined: 16 Sep 2003 Posts: 21
|
|
Posted: Wed Feb 04, 2009 4:25 am |
|
|
for the crystal "HS" osc
Abracon 25MHz ABM3B with 15pf/15pf to ground and 100 ohms in series to osc2
Very similar to what I use with the ENC28J60 on another design.
And for the external (EC_IO) a Raltron 25 MHz tin can ocsilator
I had not played with the cap and resistor values as I though the issue likely the new board, but I've exausted that approach.
I also tried using INTRC |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Feb 04, 2009 1:24 pm |
|
|
Why would the oscillator not work ?
1. Solder short.
2. Incorrect wiring.
3. PIC held in reset due to MCLR problem or Brownout condition.
4. Bad crystal or oscillator circuit.
5. Bad PIC.
6. Other.
The fact that you tried INTRC and it still fails means it's not #4.
Quote: | exactly the same set of pins on the 67J60 but in slightly different locations of course |
This one tells me that #1 or #2 is likely the problem. Maybe #3. |
|
|
eric
Joined: 16 Sep 2003 Posts: 21
|
PIC18F86J65 Programs ok - but Osc will not start |
Posted: Wed Feb 04, 2009 1:42 pm |
|
|
I would expect 1, or 2, but I've not found either. Nor #3 having checked with scope.
For #5 I do have more 86J65's arriving today. Will try another one.
So far #6 is winning |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Feb 04, 2009 4:14 pm |
|
|
There could be other reasons. You didn't show a main(). If you let the
program run off the end of main(), it will hit a hidden sleep instruction
and power-down the PIC. The main oscillator will stop, and give the
appearance that it's not working. You can prevent this by putting an
endless loop at the end of main(). Example:
Code: | void main()
{
while(1);
} |
|
|
|
eric
Joined: 16 Sep 2003 Posts: 21
|
pic18F86J65 No Clock |
Posted: Mon Feb 09, 2009 5:34 pm |
|
|
I toggle an LED in my while(true) loop.
In some act of desparation, I took a 67J60 that I ordered along with the extra 86J65's. This part is on the CCS eval Ethenet board, and works great.
I had noted that the B7,osc1,osc,2,B6 pins lined up, so I carefully attached these, and then only the AVdd, Vdd, Vddpll, and Vdcore, and corresponding Vss(xx) pins, along with one I/O pin (RD0), and MRCL, clipping off any unsued pins to make the wire wrap wire attach to these pins easier. Quite tedious, but doable.
Afer unmixing one miss-wiring connection, the 67J60, fired up perfectly, with the LED blinking on RD0.
the 67J60 is usng the same code, the same key Vdd, Vss pins on my proto board, and the 86J60, I've replaced it threed times (carfully), yet the 86J65 clock does not start!
drop the 67J60 on to this board with sufficent I/O for this task (extra serial port in the 86J65 would be handy, but can live without it)
1. I've still missed something on the board, that once the 67J60 is fully mapped, the same issue would come up.
2. If I've missed something, resolving it would be faster than revising the PCB
3. the 86j65 basically has it in for me. Best to just move on.....
-sigh |
|
|
|