View Full Version : How to use a 20 MHz resonator on a 16F688
Thomas Williams
- 20th December 2005, 18:39
Question: what are the settings to fire up a 20 MHz resonator instead of the onboard clock?
right now I have the OSCCON = &70 for 8 Mhz but am missing the documentation where there is a 20 MHZ switch?
thanks for andy help.
PS how would you verify a 20 MHz operation being functional. which pin to verify with ocilloscope. thanks
Tissy
- 21st December 2005, 02:29
Define Osc 20
Luciano
- 21st December 2005, 09:18
PS how would you verify a 20 MHz operation being functional. which pin to verify with ocilloscope. thanks
Hi,
With the code below you should see the light of the LED 60 times in 1 minute.
Just count and check your watch. (The LED is ON for 500 ms and OFF for 500 ms).
Remember to add to your code "Define Osc 20" and set as output the pin where the LED is connected.
Best regards,
Luciano
Low PORTB.0 ' Turn off LED connected to PORTB.0
loop: Toggle PORTB.0 ' Toggle the LED connected to PORTB.0
Pause 500 ' Delay for 500 milliseconds
Goto loop ' Go back to loop and blink LED forever
End
Example with LED. (Your board will have a different oscillator).
http://img8.picsplace.to/img8/3/pic_led.jpg (http://picsplace.to/)
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.