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

how to configure 4xPLL ?

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



Joined: 19 Nov 2004
Posts: 11

View user's profile Send private message MSN Messenger ICQ Number

how to configure 4xPLL ?
PostPosted: Wed Aug 31, 2005 2:56 am     Reply with quote

Hi everyone,

I tried to use PIC18F2331 with a 10MHz, configure as H4, but it cannot run.

is it correct to use the configuration below ?
#use delay(clock=40000000)
#fuses H4

or should it be this way?
#use delay(clock=10000000)
#fuses H4

Can someone guide me?
asmallri



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

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

PostPosted: Wed Aug 31, 2005 3:01 am     Reply with quote

When you set the H4 fuse don't forget you must power cycle the PIC or it will not use the multiplier.

This is the "most correct"
Code:

#use delay(clock=40000000)
#fuses H4

Where are the rest of the fuses? For example, do you intent to use LV programming? If not then add NOLVP.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

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

PostPosted: Wed Aug 31, 2005 8:16 am     Reply with quote

asmallri are you sure about this. I have a 10MhZ clock and use the H4 fuse.
When I do ..
#USE DELAY(CLOCK=10000000)
#FUSES H4,HS,NOWDT,NOPROTECT,NOLVP
My serial ouput looks correct.

When I do ..
#USE DELAY(CLOCK=40000000)
#FUSES H4,HS,NOWDT,NOPROTECT,NOLVP
My serial output is garbage. Even after power cycle.


Last edited by treitmey on Wed Aug 31, 2005 8:42 am; edited 2 times in total
TerryGiles
Guest







4xPLL
PostPosted: Wed Aug 31, 2005 8:33 am     Reply with quote

Treitmey
You only need H4 in your fuse list. You have put H4,HS which probably
turns off the PLL multiplier. With 10MHz crystal and fuse H4 set clock to
40000000 as you suggest in your first example.

Regards

Terry
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

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

PostPosted: Wed Aug 31, 2005 8:43 am     Reply with quote

with 1 liner program and ONLY H4 and a power cycle. Got good com and a 1.25Mhz. I think my 4x is working now.

#USE DELAY(CLOCK=40000000)
#FUSES H4,NOWDT,NOPROTECT,NOLVP


How is daviz doing??
daviz



Joined: 19 Nov 2004
Posts: 11

View user's profile Send private message MSN Messenger ICQ Number

the 4xPLL works !
PostPosted: Wed Aug 31, 2005 6:51 pm     Reply with quote

Surprised

Hi everyone,

Thanks very much.

I tried using
#use delay(clock=40000000)
#fuses HS

it works well.

But, at this configuration, the maximum baudrate that can be used is 38400.
When I use 24MHz clock, the baudrate can go up to 115200.
Am I correct?

Regards,
Daviz
daviz



Joined: 19 Nov 2004
Posts: 11

View user's profile Send private message MSN Messenger ICQ Number

PostPosted: Wed Aug 31, 2005 6:53 pm     Reply with quote

i wrote wrongly above,

its not #fuses HS
it should be #fuses H4
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: the 4xPLL works !
PostPosted: Wed Aug 31, 2005 7:10 pm     Reply with quote

daviz wrote:
Surprised

Hi everyone,

Thanks very much.

I tried using
#use delay(clock=40000000)
#fuses H4

it works well.

But, at this configuration, the maximum baudrate that can be used is 38400.
When I use 24MHz clock, the baudrate can go up to 115200.
Am I correct?

Regards,
Daviz


No. With this configuration and the #use RS232... you can do 115200
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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