PDA

View Full Version : 18f2320



mikeh
- 13th September 2008, 08:15
has anyone used this chip on hspll
need to run at 40 meg
using ext 10 meg
set osc to hspll
will run for a moment (1sec) and lockup
same simple code on 20 meg osc (hs) runs no problem
all i change is from hs to hspll
is there something else i need to change in config
thanks

skimask
- 13th September 2008, 16:50
And again, don't have any code.

mikeh
- 14th September 2008, 06:26
sorry here is code

INCLUDE "P18F2320.INC"
LIST R=DEC
LIST P=18F2320

__CONFIG _CONFIG1H, _IESO_ON_1H & _FSCM_OFF_1H & _HS_OSC_1H
__CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _BORV_20_2L
__CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_32K_2H
__CONFIG _CONFIG3H, _MCLRE_ON_3H
__CONFIG _CONFIG4L, _DEBUG_OFF_4L & _LVP_ON_4L & _STVR_ON_4L

__CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L
__CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
__CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L
__CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
__CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L
__CONFIG _CONFIG7H, _EBTRB_OFF_7H


works no problem



INCLUDE "P18F2320.INC"
LIST R=DEC
LIST P=18F2320

__CONFIG _CONFIG1H, _IESO_ON_1H & _FSCM_OFF_1H & _HSPLL_OSC_1H
__CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _BORV_20_2L
__CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_32K_2H
__CONFIG _CONFIG3H, _MCLRE_ON_3H
__CONFIG _CONFIG4L, _DEBUG_OFF_4L & _LVP_ON_4L & _STVR_ON_4L

__CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L
__CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
__CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L
__CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
__CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L
__CONFIG _CONFIG7H, _EBTRB_OFF_7H

DOES NO WORK

THANKS
MIKE

skimask
- 14th September 2008, 06:31
Well, that code doesn't do ANYTHING!!!
I use the 4xPLL almost exclusively on the 18F series. Haven't had a problem with it.
Good cap's across on Vdd/Vss, decent ramp up on the power supply, pullup on MCLR?

Bruce
- 14th September 2008, 16:10
Do you have the extended or industrial version of the 18F2320?

mikeh
- 15th September 2008, 08:51
i wii check what version i have
what is the right one
reason i did not include code as i tested it with simple led on wait led off
works on all speeds except hspll will try again
what ramp speed do you use?

thanks

skimask
- 15th September 2008, 13:37
what ramp speed do you use?

Sorry...I don't have enough money to buy a power supply with a programmable power on ramp up... :D

Just a clean power supply, decent design, make sure the config bits are set right, try a slower crystal while still using 4xPLL (i.e. 4Mhz xtal gives you 16Mhz, etc)...and so on...

mikeh
- 16th September 2008, 07:39
ok
so how do you know if you have extended or industrial
spec are not clear on this ?

mike

mackrackit
- 16th September 2008, 08:20
The next to the last page of the data sheet tells how to identify the chip.
18Fxxx = normal voltage
18LFxxx= extended voltage

If there is an "I" near the end of the number (I/P) it is industrial.

mikeh
- 18th September 2008, 06:14
thanks for info
i am using 18f2320 (i/sp)