18F252 needs a jumpstart


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Location
    Masonville,NY
    Posts
    2

    Default 18F252 needs a jumpstart

    This is my first use of an 18F device, MPASM and posting to this forum.

    I'm moving from a 16F877 to an 18F252. My code assembles fine and loads without errors but does not run - there is no oscillation from resonator, so I'm sure it isn't a code problem. Shouldn't it work using the manual settings in the programmer, like HS for 20MHz, etc? Configuration does not NEED to be set in code, does it? Does this device need something really unique that I've missed from reading the manuals?

    I built up a second board and it does the same. I'm quite sure it isn't hardware.

    Thanks, Bob

  2. #2
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Go to your datasheet and read the section on the oscillator options. The HS setting is only used with external crystals or resonators. You need to set the config fuses so the PIC knows to start out with the internal osc, and not an external one.

  3. #3
    Join Date
    Jan 2006
    Location
    Masonville,NY
    Posts
    2


    Did you find this post helpful? Yes | No

    Default 18F252 needs a jumpstart

    I'm posting the resolution to this for the benefit of anyone who might come across this problem.

    After trying several alternate fixes, what finally made it work was installing a 103 resistor across OSC1 and OSC2, along with the normal resonator circuit.

    I did read the 18F252 manual long before my original post, which is why I bought the chip in the first place. On page 19 of 316, I see there is no internal oscillator to switch FROM, and HS IS the correct setting for external 20MHz resonators. The device does not seem to have 20MHz resonators listed, but FYI, mine now works! Also, code assembled and loaded without setting config bits within it. Manually setting config in the programmer worked, which I verified by reading the config back out of the programmed chip. MPASM was not a problem other than the length of the file path and it appears to have made my code about 5k longer, cancelling much of the gains of moving to a bigger chip. My blinker test code worked and everything else went as normal. I'm off and running.

    I posted this hoping to avoid hammering out the solution to yet another PIC mystery and save some time.

    Other than insulting my intelligence (READ! Why didn't I think of THAT?), giving wrong information, and not addressing a single issue in my post, this has been a great help.

Similar Threads

  1. 18f252
    By Meriachee in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 28th July 2009, 02:32
  2. Pic 18f252 not responding
    By gringo332 in forum General
    Replies: 5
    Last Post: - 22nd March 2007, 21:21
  3. PIC 18F252 to NOKIA 7210
    By Speedykart in forum Off Topic
    Replies: 0
    Last Post: - 9th June 2005, 13:30
  4. 18F252 internal EEPROM / DATA, READ
    By NavMicroSystems in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 1st June 2004, 14:01
  5. Need help with migration 16F876 -> 18F252
    By NavMicroSystems in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th February 2004, 16:22

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