CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC18F86J65 Programs ok - but Osc will not start

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
eric



Joined: 16 Sep 2003
Posts: 21

View user's profile Send private message

PIC18F86J65 Programs ok - but Osc will not start
PostPosted: Tue Feb 03, 2009 9:25 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Feb 04, 2009 2:05 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Feb 04, 2009 4:25 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Feb 04, 2009 1:24 pm     Reply with quote

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

View user's profile Send private message

PIC18F86J65 Programs ok - but Osc will not start
PostPosted: Wed Feb 04, 2009 1:42 pm     Reply with quote

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 Smile
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 04, 2009 4:14 pm     Reply with quote

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

View user's profile Send private message

pic18F86J65 No Clock
PostPosted: Mon Feb 09, 2009 5:34 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group