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 support@ccsinfo.com

ERROR: Option invalid No PLL, after updating CCS to 4.127

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Nov 26, 2011 3:42 pm     Reply with quote

I'm not at a location today where I can test this in hardware, or even with
the latest version, but try this code. I think it has a good chance to work.
Code:

#include <18F25K20.h>
#fuses H4,NOWDT,NOLVP,BROWNOUT,PUT,NOPBADEN
#use delay(clock=40M)

//===========================================
void main()
{

while(1)   // Toggle LED at 1 Hz rate
 {
  output_toggle(PIN_B0);
  delay_ms(500);
 }

}
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sat Nov 26, 2011 4:22 pm     Reply with quote

Quote:
try this code. I think it has a good chance to work.

Yes. If you specify H4, you don't need (oscillator=10M,clock=40M) respectively (crystal=10M,clock=40M). The #delay syntax has been apparently intended as an alternative to explicite PLL fuses. Both methods work.

You may recognize an adavantage of the #use delay PLL specification when using a device that supports various clock multiply rates, not only fixed factor 4.

The problem is, that CCS abandoned once more a previously working syntax.
mose



Joined: 26 Nov 2011
Posts: 4
Location: Denmark

View user's profile Send private message

PostPosted: Sat Nov 26, 2011 5:41 pm     Reply with quote

@PCM programmer
Your code works.
I have tried the delay without either oscillator or crystal. But that just didn't make sense to me, that none was needed all of a sudden.

@FvM
You are right that since the PLL is fixed, they can very well come to the conclusion that all will be easier without oscillator / crystal in the delay line.


But I just prefer if CCS clearly state how their syntax is intended to work, especially when they change a working syntax to something new. - otherwise it hard to trust ones code to work properly under all conditions.

In general I just prefer to be sure, and when even the help file examples didnt work, I went for help...

Thanks for your help and answers.
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