try osccon.1 =1
failing that post your code and tell us what version of pbp you are using
try osccon.1 =1
failing that post your code and tell us what version of pbp you are using
This could help.
OSCCON 6:4 need setting for 16 MHZ which is $70, which is what you have.
OSCTUNE 6 needs setting to connect internal oscillator to 4xPLL $40, which you have.
Looking at the Internal Oscillator Block OSCCON 1:0 have an effect and from the datasheet.
bit 1-0 SCS<1:0>: System Clock Select bits
1x = Internal oscillator block
01 = Secondary (Timer1) oscillator
00 = Primary clock (determined by CONFIG1H[FOSC<3:0>]).
which tells me, if I understand correctly, that OSCCON 1 needs setting. Which is what Richard said.
Which now makes OSCCON $72.
Last there is config1H for HSPLL and HFINTOSC/PLL
_FOSC_HSPLL_1H EQU H'F6' ; HS oscillator, PLL enabled (Clock Frequency = 4 x FOSC1)
_FOSC_INTIO67_1H EQU H'F8' ; Internal oscillator block, port function on RA6 and RA7
_FOSC_INTIO7_1H EQU H'F9' ; Internal oscillator block, CLKOUT function on RA6, port function on RA7
which I leave to you or others to explain, I use boot loader and never used configs.
Steve Earl www.datageo.co.uk
THANSKS alot for your help.
yes, i try
OSCCON = $72,
OSCTUNE = $40
the problem still persises.
portb.6 lost power. but it runs faster
-------------------------------------------------------------------------------
here is the conf.
__CONFIG _CONFIG1H, _FOSC_INTIO7_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2H, _WDTEN_ON_2H & _WDTPS_512_2H' __CONFIG _CONFIG3H, _CCP2MX_PORTC_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _HFOFST_ON_3H & _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L
OSCCON = $72,
OSCTUNE = $40
-----------------------------------------------------------------------------
portb = 0
latb = 0
trisb = 0
----------------------------------------------------
about the SCS it is automatic set to 00- becasue in the CONFI_1h --- FOSC_INRIO67- (IT IS determined by primary osc in the 1H line)
here is the explaination in the data sheet
------------------------------------------============
2.9.1 SYSTEM CLOCK SELECT
(SCS<1:0>) BITS
The System Clock Select (SCS<1:0>) bits of the
OSCCON register select the system clock source that
is used for the CPU and peripherals.
• When SCS<1:0> = 00, the system clock source is
determined by configuration of the FOSC<2:0>
bits in the CONFIG1H Configuration register.
• When SCS<1:0> = 10, the system clock source is
chosen by the internal oscillator frequency
selected by the INTSRC bit of the OSCTUNE
register and the IRCF<2:0> bits of the OSCCON
register.
• When SCS<1:0> = 01, the system clock source is
the 32.768 kHz secondary oscillator shared with
Timer1.
After a Reset, the SCS<1:0> bits of the OSCCON
register are always cleared.
-----------------------------------------------------------
the version, of pbp. it is 2.6c
i read the post of: http://www.microchip.com/forums/m730158.aspx-
also mentioned the same issue- but the PLLCFG is not recognized in the PBP
thanks for your concern,
regards
Very interesting thanks.i read the post of: http://www.microchip.com/forums/m730158.aspx
Yes one of the settings that worked in the above link is.
__CONFIG _CONFIG1H, _FOSC_INTIO67_1H
OSCCON = $70
OSCTUNE = $40
Is that not what you started with?
Steve Earl www.datageo.co.uk
Y]hello,
yes the above is work.
..
osccon = $70 or (60)
osctune = $40
for single leds
i move to drive 595 then there r problem- lost power or low speed @ out put
now i try to clean the pbp to see waht happen'
thenak for your help.
regards
HI ALL,
the pic run well @ 4mhz ,HSPLL; 8, 10mhz ... problem (HSPLL).
the conf. remains unchanged
__CONFIG _CONFIG1H, _FOSC_HSPLL_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2H, _WDTEN_ON_2H & _WDTPS_512_2H
__CONFIG _CONFIG3H, _CCP2MX_PORTC_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _HFOFST_ON_3H & _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L
where is the problem?
thanks all for your help
regards
The conf. has changed from #4
also you saidhere is the conf.
__CONFIG _CONFIG1H, _FOSC_INTIO7_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2H, _WDTEN_ON_2H & _WDTPS_512_2H' __CONFIG _CONFIG3H, _CCP2MX_PORTC_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _HFOFST_ON_3H & _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L
If it works for single leds then it works and all of your code needs checking. So please post your code so we can help.yes the above is work.
..
osccon = $70 or (60)
osctune = $40
for single leds
i move to drive 595 then there r problem- lost power or low speed @ out put
Steve Earl www.datageo.co.uk
Bookmarks