Changing the Configuration Settings
Greetings,
I am using MicroCode Studio to write my code and then click Project/Compile and Program. This then opens meProg and I click Ctrl-P to program the PIC. The PIC is connected using MeLabs U2 USB Programmer. I do all this but am not really totally sure of what is going on.
My problem is I want to increase the oscilation value from 4 to 20. It says in the manual that I need to open an .inc file with the same name as my PIC and change XT to HS.
First problem is where is this inc file. There are a bunch in C:\PBP and I am guessing these are the ones. But next problem is there is not one exactly the same name as my PIC (PIC18F4620). However, there is one 18F46K20.INC.
There is a line in this file with OSC and XT in it: __CONFIG _CONFIG1H, _FOSC_XT_1H
So I change XT for HS as mentioned in the manual: __CONFIG _CONFIG1H, _FOSC_HS_1H
I then change the define to: DEFINE OSC 20
I change my 4MHz Ceramic Resonator with a 20MHz Ceramic Resonator, and all should be good one would think.
But it isn't - my program output does not work.
All I am doing is sending simple SEROUT2 i.e. Serout2 0, 16468, [$1b, $52, 1, DEC test]
My program seems to be running slower than when I had it using 4MHz
Anyone got any ideas of what I am doing wrong.