PDA

View Full Version : PIC18F2685 config settings for 20 MHz



wwilson17
- 31st March 2008, 21:03
What should the configuration settings be set to for a PIC18F2685 when running a 20 MHz crystal? Right now I have the oscillator set on HS and the watch dog timer disabled. I have DEFINE OSC 20 at the beginning of my program. It seems to be running too fast and it is not seeing my serial input.

mister_e
- 31st March 2008, 21:07
Well there's a slight difference in the fuse that may screwup things... there's _OSC_HS_1H and _OSC_HSPLL_1H .

Now how faster it is? Led Blink, serial comm, HPWM are nice start point.

Just post your code here.

wwilson17
- 31st March 2008, 21:38
I'm using MicroCode Studio to burn the chip and I use the configuration settings provided by the software. Other than that, the only line dealing with the oscillator setting in my code is the DEFINE OSC 20 (PicBasic Pro). I can't post my entire code here because it is over 15,000 lines long. I'm driving a graphical LCD with the PIC. Concerning the header info you showed in your response, what language is that written in?

skimask
- 31st March 2008, 21:51
I'm using MicroCode Studio to burn the chip and I use the configuration settings provided by the software. Other than that, the only line dealing with the oscillator setting in my code is the DEFINE OSC 20 (PicBasic Pro). I can't post my entire code here because it is over 15,000 lines long. I'm driving a graphical LCD with the PIC. Concerning the header info you showed in your response, what language is that written in?
Well, if you're using PicBasicPro, and this is a PicBasicPro oriented site, then it would follow that the line given above is a PicBasicPro compatible line....in one way or another...
See the following link...
http://www.picbasic.co.uk/forum/showthread.php?t=543&highlight=presetting+config
Bookmark it, Hotlink it, read it, then read it again, then read it again after that.
Lots of good info on how things integrate with PBP, assembly, etc.

wwilson17
- 31st March 2008, 23:03
I've read the thread you suggested. Can't I just establish the proper settings in the configuration listing instead of writting a line of code?

mackrackit
- 31st March 2008, 23:13
I've read the thread you suggested. Can't I just establish the proper settings in the configuration listing instead of writting a line of code?

You can modify the *.inc file for the chip ( make a back up for safety)