Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

Why can a PIC16F1939 misbehave when switching away from a stable 16 MHz Diodes crystal?

If the PIC16F1939 is silicon revision A1 or A2, review the software clock transition before blaming the crystal. Microchip's errata says that a single corrupted instruction may execute after a switch between the internal oscillator and an external clock source. The symptom can occur even if the external crystal is stable around the transition. A 16 MHz Diodes FL passive crystal is a component candidate, but tighter frequency tolerance does not resolve this silicon behavior.

The two directions use different intermediate steps

When moving from an external oscillator to an internal source, the vendor workaround first selects the 16 MHz HFINTOSC. Only after operating at that setting should IRCF be configured for the desired internal frequency. When moving from internal to external, first run the high-power HFINTOSC at 8 MHz or 16 MHz, then switch to the external source. Do not collapse these into an instruction to use 8 MHz in either direction. The erratum also states that this issue does not affect Two-Speed Start-up or Fail-Safe Clock Monitor operation; it should not be used to explain every cold-start failure.

Capture the transition and its first observable result

With a known silicon revision on an authorized repair bench, keep the crystal and its board assembly unchanged. Repeat the controlled internal-to-external and external-to-internal transitions; record the previous source, target source, direction and first affected application state. Compare the original firmware path with the vendor workaround. An occasional immediate execution fault and an oscillator that never starts are different evidence. If it never starts, separately review the exact FL ordering code, load, drive and startup margin. If the failure follows a particular transition on affected silicon, update and validate the firmware before returning crystals.

Related selection guide: MERLIN Crystal Timing: Can a PIC16F877A Replace a 4 MHz Crystal with 20 MHz? Check XT, HS and Timing

Resource link: https://www.mecxtal.com.cn/en/handbook/new-0783.html

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.