18F1320 Clock running


Closed Thread
Results 1 to 7 of 7
  1. #1
    Dave W's Avatar
    Dave W Guest

    Default 18F1320 Clock running

    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

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink Once more the 1320 ....

    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
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Dave W's Avatar
    Dave W Guest


    Did you find this post helpful? Yes | No

    Default 18F1320 xtal clock

    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

  4. #4
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    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

  5. #5
    Dave W's Avatar
    Dave W Guest


    Did you find this post helpful? Yes | No

    Default 18F1320 Xtal Clock

    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

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink Stupid question ...

    Hi, Dave

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

    I had surprises also on this side ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: 18F1320 Xtal Clock

    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

Similar Threads

  1. Single digit 7 Seg LED clock - PIC16F88
    By thirsty in forum Code Examples
    Replies: 4
    Last Post: - 17th July 2009, 08:42
  2. UberNewbie can't set his clock...
    By Byte_Butcher in forum General
    Replies: 19
    Last Post: - 7th January 2009, 04:22
  3. EM4095 Chip, get Clock and Data signals?
    By mindthomas in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 19th August 2008, 06:27
  4. Shiftout/in
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd August 2007, 11:48
  5. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts