BINGO! .....I've got it working at about 1.30am this morning shortly after making that last post
Jerson - many thanks ....re your post above - you were bang on the money.
In conclusion to brigng the thread back on topic, for anyone wanting a pointer wrt configuring their PIC to run on an external clock - well, for a 16f690 @20Mhzthese settings work for me....
Code:
@ __CONFIG _FCMEN_OFF & _HS_OSC & _WDT_OFF & _MCLRE_OFF & _CP_OFF & _IESO_OFF & _BOR_OFF & _PWRTE_OFF
DEFINE OSC 20 ' set Oscillator at 20Mhz.
OSCCON.0 = %0001000
(for the above to work, you need to be using MPASM)
And if you're doing anything with timers/counting clocks, bear in mind what Alain said above ....ie that the number of clocks counted during your own particular timeframe will be the oscillator frequency divided by 4. (which caught me out nicely)
Many thanks to both Alain & Jerson for taking the time to help me out......you've made a happy man very old (or should that be the other way round?)
Got to start learning about LUTs & arrays now - there's no end to all this learning!
Bookmarks