CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

HS & PLL on 18F452

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
davidpk



Joined: 29 Apr 2004
Posts: 13
Location: Opelika, AL

View user's profile Send private message Yahoo Messenger

HS & PLL on 18F452
PostPosted: Tue Oct 26, 2004 6:52 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Oct 26, 2004 6:58 pm     Reply with quote

Use the x4 frequency in the delay line.
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: HS & PLL on 18F452
PostPosted: Wed Oct 27, 2004 7:25 am     Reply with quote

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

View user's profile Send private message Yahoo Messenger

PostPosted: Wed Oct 27, 2004 8:19 am     Reply with quote

That was the one!

Thanks asmallri!
ünloco



Joined: 02 Oct 2011
Posts: 12
Location: Tunisia

View user's profile Send private message Visit poster's website

18F252 12Mhz H4
PostPosted: Tue Mar 06, 2012 4:41 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Mar 06, 2012 5:19 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group