lybao_huy
01-04-2010, 01:01 PM
trong Datasheet có nói:
The Fail-Safe Clock Monitor (FSCM) allows the device
to continue to operate even in the event of an oscillator
failure. The FSCM function is enabled by programming.
If the FSCM function is enabled, the LPRC internal
oscillator runs at all times (except during Sleep mode)
and is not subject to control by the Watchdog Timer.
In the event of an oscillator failure, the FSCM
generates a clock failure trap event and switches the
system clock over to the FRC oscillator.
Tôi thiết lập FCKSM<1:0> Configuration bit is 00 // có khả năng giám sát và Chuyển Clock.
và lúc bật nguồn tôi dùng bộ dao động FRC oscillator.
sau đó tôi dùng các lệnh trong thanh ghi OSCCON để chuyển sang Primary (XT) oscillator với không PLL, và đã chuyển thành công, trong lúc đang chạy tôi tháo bỏ thạch anh ra, thì đáng lẽ ra nó vẫn tiếp tục chạy vì Fail-Safe Clock Monitor sẽ tự động chuyển sang FRC oscillator, nhưng nó lại dừng chương trình, vậy nguyên nhân do đâu xin anh em trả lời giúp
The Fail-Safe Clock Monitor (FSCM) allows the device
to continue to operate even in the event of an oscillator
failure. The FSCM function is enabled by programming.
If the FSCM function is enabled, the LPRC internal
oscillator runs at all times (except during Sleep mode)
and is not subject to control by the Watchdog Timer.
In the event of an oscillator failure, the FSCM
generates a clock failure trap event and switches the
system clock over to the FRC oscillator.
Tôi thiết lập FCKSM<1:0> Configuration bit is 00 // có khả năng giám sát và Chuyển Clock.
và lúc bật nguồn tôi dùng bộ dao động FRC oscillator.
sau đó tôi dùng các lệnh trong thanh ghi OSCCON để chuyển sang Primary (XT) oscillator với không PLL, và đã chuyển thành công, trong lúc đang chạy tôi tháo bỏ thạch anh ra, thì đáng lẽ ra nó vẫn tiếp tục chạy vì Fail-Safe Clock Monitor sẽ tự động chuyển sang FRC oscillator, nhưng nó lại dừng chương trình, vậy nguyên nhân do đâu xin anh em trả lời giúp