View previous topic :: View next topic |
Author |
Message |
daviz
Joined: 19 Nov 2004 Posts: 11
|
how to configure 4xPLL ? |
Posted: Wed Aug 31, 2005 2:56 am |
|
|
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
|
|
Posted: Wed Aug 31, 2005 3:01 am |
|
|
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
|
|
Posted: Wed Aug 31, 2005 8:16 am |
|
|
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 |
Posted: Wed Aug 31, 2005 8:33 am |
|
|
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
|
|
Posted: Wed Aug 31, 2005 8:43 am |
|
|
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
|
the 4xPLL works ! |
Posted: Wed Aug 31, 2005 6:51 pm |
|
|
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
|
|
Posted: Wed Aug 31, 2005 6:53 pm |
|
|
i wrote wrongly above,
its not #fuses HS
it should be #fuses H4 |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
Re: the 4xPLL works ! |
Posted: Wed Aug 31, 2005 7:10 pm |
|
|
daviz wrote: |
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!! |
|
|
|