PDA

View Full Version : external clock



connortop
- 13th September 2016, 12:10
Hello, i am new to programming and am using a pic18f25k22 im trying to set it up to use an external 8mHz oscillator but from looking at the datasheet i am confused about how i do this any help would be appreciated thanks connor

richard
- 13th September 2016, 13:04
im trying to set it up to use an external 8mHz oscillator

IS that an really an oscillator or do you mean a xtal or a resonator, they all have different requirements
more info is needed and what have you tried ?

AvionicsMaster1
- 13th September 2016, 13:37
If you insist on using an external oscillator/resonator/crystal there are some examples of how to hook it up in the datasheet on page 33.

However, most people would be glad to use the internal frequency selectable oscillator. Saves pins, parts and cost.

As above, tell us what you've tried and most will steer you in the right direction.

connortop
- 13th September 2016, 13:57
think ive managed to do it now using the following line

#pragma config FOSC = HSMP

im new to pic programming and struggling to set the pic up from scratch so the i/o pins are outputs ect

i am using an 8mHz xtal i will be using the i/o pins as outputs to mulitiplex a 7 segment display

towlerg
- 13th September 2016, 17:23
If i'm not mistaken thats C, so I guess you're on the wrong board.