How to configure the clock??!!


Closed Thread
Results 1 to 4 of 4
  1. #1
    sergio.elias's Avatar
    sergio.elias Guest

    Talking How to configure the clock??!!

    Hi there. I feel silly asking this but... ahhh what the.. here it goes
    I´ve used PIC18F4550 with PIC Basic Pro a year ago and everything worked fine with serial communication. Now I´m working on a project using the same PIC with a peripheral device attached to the MCU serial port. The baudrate used will be 115200 and a 40 Mhz crystal in order to have the least error possile. It has been working fine with the internal oscillator but it can't give me 40 MHz. I´m having so many trouble configuring this crystal. Can anybody tell me the programming steps to get this crystal working properly, maybe I´m forgetting some register. I remember that the last time I had to modify a PBP .inc file but i cant find this. Can somebody help me??... thank you

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

    Default

    More information would be helpful.

    Are you trying to run the CPU core at 40MHz, and clock the USB module from
    the same oscillator?

    Or are you not using the USB module, and just trying to configure the PIC to
    run on your 40MHz crystal?

    Is this a 40MHz crystal (I.E. one requiring parallel caps) or is it a 40MHz TTL
    clock oscillator?
    Regards,

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

  3. #3
    sergio.elias's Avatar
    sergio.elias Guest

    Default More info

    Hi Bruce... I´m not using the USB module. I want to run the CPU core at 40 MHz..... my crystal is a 40 MHz parallel cut (it requires capacitors).... and doesn´t work on HS mode... I dont know what to do... I´ve tried so many different configurations...

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

    Default

    Hi Sergio,

    Above 25MHz, you'll need a TTL type clock oscillator. HS and HSPLL support
    up to 25MHz primary osc.

    Make sure you have the latest verion of the 4550 data sheet rev DS39632C
    and look in the electrical characteristics section at table 28-8, parameter 1A.

    With a 40MHz TTL type clock oscillator, and EC or ECIO oscillator modes, it
    should work fine.

    With this config you should still have full-speed USB, 40MHz CPU clock, and
    have port function on RA6.

    CONFIG PLLDIV=10,CPUDIV=OSC1_PLL2,USBDIV=2,FOSC=ECIO_EC
    Regards,

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

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. EM4095 Chip, get Clock and Data signals?
    By mindthomas in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 19th August 2008, 06:27
  3. Shiftout/in
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd August 2007, 11:48
  4. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  5. How to configure SPI in PICBASIC PRO?
    By moogle in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 15th April 2007, 18:31

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