I'm using a PIC18F47J53 in a project. Because I need to use Full-Speed USB 2.0, I can't use the internal 8MHz oscillator because it's not stable enough (*). Although Microchip has a lot of interesting application notes on Oscillator design (FACT001, AN849, AN949), I found a good Application report from Texas Instruments (SLLA122 - December 2002) which helps choosing the right components, including the XTAL.
To summarize the crystal specifications:
- Mode of operation: fundamental
- Crystal circuit type: parallel resonant
- Frequency Tolerance: ±50 ppm (maximum: ±100 ppm)
- Frequency Stability: ±50 ppm (maximum: ±100 ppm)
- Aging (Long Term Stability): ±5 ppm per year
- Maximum Equivalent Series Resistance: 50 Ω (100 Ω, if CL1 and CL2 <10 pF)
With this information, I could easily find the XTAL to use in my project.
But I have 1 question:
Is there a difference when I use a 8MHz or 16MHz XTAL? If you look at the PIC18F47J53 FAMILY CLOCK DIAGRAM, you can use both to drive the PLL Prescaler which at the end generates a 48MHz signal, that is then used for the Full-Speed USB Module and can also directly be used as CPU primary clock source.
Is there any reason why I should prefer 8MHz or 16MHz? As both can create the same result. I could easily find a XTAL of both frequencies that comply with the specifications above. Or is the price difference of 0.08 EUR (0.27 EUR for 8MHz, 0.35 EUR for 16MHz) the only reason to choose one or the other?
(*) Remark: I used the PIC18F45K50 before, which does support Full-Speed USB while using the internal oscillator. This is possible because 1) it has a 16MHz internal oscillator, and 2) because it has an Active Clock Tuning (ACT) Module, which can use the Full-Speed USB signal as reference. Unfortunately, due to the worldwide chip shortage, the PIC18F45K50 is not available until somewhere in 2023. That's why I searched for an alternative that is immediately available with some suppliers, which is the PIC18f47J53.