18.432 and 14.7456 oscillator.


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: 18.432 and 14.7456 oscillator.

    Do you intend to use the same crystal for both the PIC and the MCP2120? If not I can't see why you can't use 14.7456 for the MCP2120 and whatever for the PIC. With a 20Mhz crystal on the PIC you'll be off less than 1% at 115200 baud.

  2. #2
    Join Date
    Jul 2011
    Posts
    14


    Did you find this post helpful? Yes | No

    Default Re: 18.432 and 14.7456 oscillator.

    I made a mistake in indicating the device. I was referring to mcp2122 that does not have a clock. Fortunately I have both chips, so I think using the mcp2120 solve my problems.

    But the problem remains if I decided to use the mcp2122 which requires only an external clock with oscillator ottenible of 14.7456MHz.

    From what I understand you can not change oscillator and hope that everything keeps working?

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: 18.432 and 14.7456 oscillator.

    You can change the PICs oscillator to whatever you want. Microchip gives formulas for calculating baud rates given any oscillator frequency. PBP will work as well. The only problem is that any routine that uses software timing routines will be off. If you use DEFINE OSC 10, and you are actually running at 14.7456 Mhz, then PAUSE 100 will actually be a PAUSE 68 (it will pause for 68 mSec). Likewise, the SERIN/SEROUT routines will be off by the 10/14.7456 ratio. If you use SERIN2/SEROUT2, you can simply use the formulas given in the PBP manual to choose the correct value. If you use HSERIN/HSEROUT, you simply set BRG and the associated registers according to Microchip's formulas. You won't be able to DEFINE HSER BAUD !

    Everything will work - if you take into account the new frequency.
    Charles Linquist

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