At the beginning of the program.
If MCLR is set for External the usual RC applies.Code:DEFINE OSC 8
If MCLR is set for Internal then the pin becomes an input.
At the beginning of the program.
If MCLR is set for External the usual RC applies.Code:DEFINE OSC 8
If MCLR is set for Internal then the pin becomes an input.
Dave
Always wear safety glasses while programming.
Thanks for the speedy reply. I'll set the clock as you suggest.
With the MeLABS programmer the options are MCLR Pin Function = Reset or =Input Pin. Do you mean that the programmer should be configured with this pin as an Input Pin to make the internal MCLR pull up active? To minimise components I want to avoid having to use an external 4.7K resistor. Sorry not be be entirely clear!
The 16F688 datasheet says it defaults to 4MHz after reset so you need to set OSCCON for 8MHz. You also need to wait until the oscillator is stable. See the OSCCON section of the datasheet for details.
Bookmarks