The confi fuses for pic18f4550 in Epic programmer


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    May 2006
    Posts
    13

    Default The confi fuses for pic18f4550 in Epic programmer

    Hi all:
    I am having a hell of a time programming the pic18f4550 due to its so many clock options. I have been able to get every thing to work if i use a 4MHz ceramic resonator and the XT option from the fuse config menue. The problem occures when i use a 20MHz resonator.
    I use the command Define osc 20 but the timing is still off. I tried to send serial data and the timing is all off.
    any ideas

    thanx


    sam

  2. #2
    Join Date
    Jul 2005
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    Time for a sanity check. Forget your project for a while, make something simple work.

    Measure the clock frequency. Is it really 20 meg?

    Make a loop timed with a PAUSE to wiggle a pin up and down. Is it the right period?

    Sorry I can't be of more help with the serial commands as I've yet to use them.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Be sure to set HS in config word. This forces the PIC oscillator drive output
    to a higher level required to drive the high-speed oscillator.

    The default config word osc setting in 18F4550.INC header file is for XT.

    Look in your PBP directory for 18F4550.INC, and change XT to HS, or change
    XT to HS with your programmer software before programming the part.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    Join Date
    May 2006
    Posts
    13


    Did you find this post helpful? Yes | No

    Smile

    Thanx for the reply Bruce. The problem I am having however is not with the compiler but the programmer. In the MElabs programming softwear for the EPIC I can change the configuration fuses. My understanding was that with a 20MHz ceramic resinator if i select Osillator type as HSPLL for Pic18f4550 and use the pll divisions as 5 with the mcu clock division as 2 this should give me a frequency of 48MHz. This is according to the data sheet. however when i do this and try to send data through port B.7 at 9600, the data actually comes in at 115200. I do define the osc at 48 in the program. this is the problem.
    any ideas
    thanx
    sam

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Sorry. Your original post indicates DEFINE OSC 20 with a 20MHz osc. I didn't know you were trying this at 48MHz.

    If you're changing config settings with your EPIC software, and you have the "Reread File Before Programming" and "Update Configuration From File" options checked, then it's going to reload whatever config word settings are embedded in your .hex file before programming the part.

    You should click Save before programming to use whatever config word changes you made. Then program it.

    With a 20MHz crystal, PIC18F4550, and this osc configuration;

    CONFIG PLLDIV=5,CPUDIV=OSC1_PLL2,FOSC=HSPLL_HS

    This works perfectly at 9600;

    SEROUT2 PORTB.7,16468, ["TEST",13,10]

    If you prefer to use 20MHz without HSPLL, just change FOSC=HSPLL_HS to FOSC=HS and DEFINE OSC 48 to DEFINE OSC 20.

    This also works 100%. At least on my board.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  6. #6
    Join Date
    May 2006
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Again Thank you very much Bruce but I still cant get the thing to work. I am getting lcoser though. when you say to write the
    CONFIG PLLDIV=5,CPUDIV=OSC1_PLL2,FOSC=HSPLL_HS in the softwear, do i need to add a @ before the word config. I tried this with both the @ and without and the compiler gave me errors both times. what is the exact wording that i need to type into my program
    thanx again
    sam

Similar Threads

  1. epic programmer to lcd
    By rdxbam in forum General
    Replies: 2
    Last Post: - 3rd November 2008, 23:35
  2. epic programmer not found ---HELP!
    By dmacq in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 2nd February 2008, 19:38
  3. Need the programmer EPIC software
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd April 2007, 11:42
  4. EPIC Programmer - Works for all chips but the 16F876A
    By 4Lewis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 12th April 2006, 23:59
  5. EPIC PLUS programmer (problem)
    By pakbasic in forum General
    Replies: 3
    Last Post: - 17th May 2005, 19:28

Members who have read this thread : 0

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