
Originally Posted by
mackrackit
Hi Henrik,
I started playing with the 4431 DIP version and wonder if you have ran into this with the one you are using. Maybe it is a 4331 problem, maybe whole series.
When using a 4Mhz resonator and have the config set for HSPLL and DEFINE OSC 16 all works well.
If I replace the 4Mhz with a 10 Mhz and try DEFINE OSC 40 everything goes erratic.
The PIC runs but even a simple "blinky" will blink randomly.
Here is the very simple code and configs I was playing with to set the OSC.
Code:
@ __CONFIG _CONFIG1H, _OSC_HSPLL_1H
@ __CONFIG _CONFIG2H, _WDTEN_ON_2H & _WDPS_512_2H
@ __CONFIG _CONFIG2L, _BOREN_OFF_2L & _PWRTEN_ON_2L
@ __CONFIG _CONFIG3H, _MCLRE_OFF_3H
@ __CONFIG _CONFIG4L, _LVP_OFF_4L
DEFINE OSC 16
START:HIGH PORTD.1:PAUSE 500
LOW PORTD.1:PAUSE 500:GOTO START
Maybe you need to set manuel 4 nibbles of config manuel :
Code:
bit 7 IESO: Internal External Switchover bit
1 = Internal External Switchover mode enabled
0 = Internal External Switchover mode disabled
bit 6 FCMEN: Fail-Safe Clock Monitor Enable bit
1 = Fail-Safe Clock Monitor enabled
0 = Fail-Safe Clock Monitor disabled
bit 5-4 Unimplemented: Read as ‘0’
bit 3-0 FOSC<3:0>: Oscillator Selection bits
11xx = External RC oscillator, CLKO function on RA6
1001 = Internal oscillator block, CLKO function on RA6 and port function on RA7
1000 = Internal oscillator block, port function on RA6 and port function on RA7
0111 = External RC oscillator, port function on RA6
0110 = HS oscillator, PLL enabled (clock frequency = 4 x FOSC1)
0101 = EC oscillator, port function on RA6
0100 = EC oscillator, CLKO function on RA6
0010 = HS oscillator
0001 = XT oscillator
0000 = LP oscillator
and probe ?
Bookmarks