PDA

View Full Version : 18F1320 Clock running



Dave W
- 6th April 2006, 19:11
Hello...
I'm using an 18F1320 and have written code that once worked...
The code appears to download fine ( as indicated by the meLabs serial programmer...)... but now it does not execute...
I probed around on the circuit PCB and found that the 4MHZ xtal clock was not running...
I have the DEFINE OSC 4 in the code... and...
I found the CONFIG1H register and set it for the XT OSC mode... no help...

What am I missing to set up the 18F1320 to run on the 4MHZ XT clock?
with out having to depend on the meLabs serial programmer...

thanks
Dave

Acetronics2
- 7th April 2006, 14:21
Hi, Dave

Did you try the HS setting for the clock ... some crystals are a bit lazy !!!

try also to use low value caps around ( 15 to max 27 pf )

Alain

Dave W
- 8th April 2006, 16:06
Hi Alain...
Thanks for the response...
Unfortunately I did try changing the xtal osc feedback caps...
27pF down to 18pF... no luck...
I tried the HS setting for the CONFIG1H register as well ... no luck...
also using the HS setting in the meLabs serial programmer...

I borrowed a better O'scope...
It looks as if it's trying to start, at initial power up... but dies away..

If you have any other ideas or resources to research.. I open...

Dave

Dave
- 9th April 2006, 02:12
Dave W, If I might ask, who's crystals are you using? Do you have the spec's handy? I wouldn't giveup yet. Try putting a 1 Meg resistor across the oscin and oscout terminals with the crystal and 18pf caps in place.

Dave Purola,
N8NTA

Dave W
- 10th April 2006, 12:34
Hello Dave...
The xtal is a Citizen CM309S series...18pF Cl...

I tried the 1Mohm R across the xtal... no luck...
I also tried the series R from 10 ohm to 27 ohm... no luck

Maybe a bit more background...
Basically I have built 3 units... (I only had 3 PCB's built from the "quick turn" PCB house..)
2 worked... 1 doesn't... using the same S/W code...
but it took 6 - 18F1320 units to get the 2 working units....
That's why I thought it may have been a S/W setup problem...

The one key symptom is that the xtal osc isn't running...
This happened before... but I think because of IC swapping... it went away...

Dave W
N9DQW

Acetronics2
- 10th April 2006, 12:47
Hi, Dave

Did you tried to read the real config settings from the chip ONCE PROGRAMMED ???

I had surprises also on this side ...

Alain

iw2fvo
- 7th June 2013, 19:42
Hi !
I have to transfer a program from a pic16f628 to a PIC18F1320 enviroment..
The program runs well on the 628 but it does not on the 1320.
The prg compiles OK using PBP pro and the micro is programmed OK with ICD2 programmer.
I use a 20 Mhz XTAL osc and it is running as seen by the scope.
Any help for me to configure the new 1320 ?
Thanks in advance.
Ambrogio