
Originally Posted by
Thomas Williams
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
Code:
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).
Bookmarks