I've been using the 18F87J50 on a demo board for testing until I get my proto PCB's in. I am going to use the 18F67J50. I changed the firmware to use the 67J50 and when I compiled it said "Undefined identifier OSC_PLL_ON".
In the 18F87J50.h file the constants used in setup_oscillator() are:
Code:
// First param:
#define OSC_31KHZ 0
#define OSC_125KHZ 0x10
#define OSC_250KHZ 0x20
#define OSC_500KHZ 0x30
#define OSC_1MHZ 0x40
#define OSC_2MHZ 0x50
#define OSC_4MHZ 0x60
#define OSC_8MHZ 0x70
#define OSC_16MHZ 0x4060
#define OSC_32MHZ 0x4070
// The following may be OR'ed in with the above using |
#define OSC_TIMER1 1
#define OSC_INTRC 2
#define OSC_NORMAL 0
// The following may be OR'ed in with the above using |
#define OSC_IDLE_MODE 0x80
#define OSC_31250 0x8000
#define OSC_PLL_ON 0x4000
#define OSC_PLL_OFF 0
// A second optional parameter may be used with this part to fine
// tune the speed (signed int,0-31)
// Result may be (ignore all other bits)
#define OSC_STATE_STABLE 4
#define OSC_STATE_EXT_RUNNING 8
In the 18F67J50.h file, the constants used in setup oscillator are:
Code:
#define OSC_31KHZ 0
#define OSC_125KHZ 0x10
#define OSC_250KHZ 0x20
#define OSC_500KHZ 0x30
#define OSC_1MHZ 0x40
#define OSC_2MHZ 0x50
#define OSC_4MHZ 0x60
#define OSC_8MHZ 0x70
// The following may be OR'ed in with the above using |
#define OSC_TIMER1 1
#define OSC_INTRC 2
#define OSC_NORMAL 0
// The following may be OR'ed in with the above using |
#define OSC_IDLE_MODE 0x80
// A second optional parameter may be used with this part to fine
// tune the speed (signed int,0-63)
// Result may be (ignore all other bits)
#define OSC_STATE_STABLE 4
#define OSC_STATE_EXT_RUNNING 8
Obviously the reason my code doesn't compile is because OSC_PLL_ON is not defined for the 67J50. My question is, on the 18F67J50, how do I turn the oscillator PLL on? Can I just define OSC_PLL_ON as 0x4000 in the 18F67J50.h?
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Fri Oct 03, 2008 5:55 pm
It looks like they made a mistake. The full set of #define statements
should also have been put in the 18F67J50 header file. The data sheet
doesn't say there is any difference between the 67J50 and the 87J50 PICs.
You should email CCS tech support and tell them about this problem.
I checked vs. 4.080 and it has the bug.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum