View previous topic :: View next topic |
Author |
Message |
davidpk
Joined: 29 Apr 2004 Posts: 13 Location: Opelika, AL
|
HS & PLL on 18F452 |
Posted: Tue Oct 26, 2004 6:52 pm |
|
|
I'm trying to use the PLL for the first time and I'm having some trouble:
In my #delay() statement do I use the real crystal or the x4 frequency?
Is the baud rate generated from the real or the multiplied frequency?
Any ideas? |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Tue Oct 26, 2004 6:58 pm |
|
|
Use the x4 frequency in the delay line. |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
Re: HS & PLL on 18F452 |
Posted: Wed Oct 27, 2004 7:25 am |
|
|
davidpk wrote: | I'm trying to use the PLL for the first time and I'm having some trouble:
In my #delay() statement do I use the real crystal or the x4 frequency?
Is the baud rate generated from the real or the multiplied frequency?
Any ideas? |
also don't forget you need to do a power on reset after programming the processor to enable the 4 times multiplier |
|
|
davidpk
Joined: 29 Apr 2004 Posts: 13 Location: Opelika, AL
|
|
Posted: Wed Oct 27, 2004 8:19 am |
|
|
That was the one!
Thanks asmallri! |
|
|
ünloco
Joined: 02 Oct 2011 Posts: 12 Location: Tunisia
|
18F252 12Mhz H4 |
Posted: Tue Mar 06, 2012 4:41 pm |
|
|
Hello my program starts like this
Code: |
#FUSES NOWDT, WDT128, H4, NOPROTECT, NOOSCSEN, NOBROWNOUT, BORV20, NOPUT, STVREN, NODEBUG, NOLVP, NOWRT, NOWRTD, NOWRTB, NOWRTC, NOCPD, NOCPB, NOEBTR, NOEBTRB
#use delay(clock=48000000)
|
I see no change between HS and H4.
Is it the bootloader ?
I programmed this hex (18F252_20MHz) into the chip.
Then I changed the 20MHz Crystal to a 12MHz, changed the baud rate in the bootloader options and then the execution got slower with or without H4 !
I did power reset but nothing changed !
Am I missing something ?
ps: The problem is that I can't remove the chip easily now :D so I better stick with the bootloader. _________________ for(;;); |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Mar 06, 2012 5:19 pm |
|
|
Quote: | Then I changed the 20MHz Crystal to a 12MHz
|
Download the 18F252 data sheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/39564c.pdf
Look in this section:
TABLE 22-4: EXTERNAL CLOCK TIMING REQUIREMENTS
Param. No. 1A
What does it say is the maximum (crystal) oscillator frequency for PLL mode ?
Also look in this section for the same information:
2.5 HS/PLL |
|
|
|