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

delay_ms problems with the command

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



Joined: 01 May 2016
Posts: 4

View user's profile Send private message

delay_ms problems with the command
PostPosted: Sun May 01, 2016 4:45 pm     Reply with quote

Hey guys ... I am new to pic controllers and scheduled ccs ... in a moment of madness that not pressed or gave accept that now the compiler does not recognize the command delay_ms... even in the libraries...


uninstall it and install again but the problem is ... I hope you can help me
temtronic



Joined: 01 Jul 2010
Posts: 9247
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun May 01, 2016 4:54 pm     Reply with quote

show us a small,compilable program that has the problem, as well as compiler version and PIC type.
also post the 'error message' that comes up.

Jay
Andr3s



Joined: 01 May 2016
Posts: 4

View user's profile Send private message

PostPosted: Sun May 01, 2016 4:58 pm     Reply with quote

https://www.flickr.com/photos/fcsuil/26154147384/in/dateposted-public/
Andr3s



Joined: 01 May 2016
Posts: 4

View user's profile Send private message

PostPosted: Sun May 01, 2016 5:00 pm     Reply with quote

[/img]
https://www.flickr.com/photos/fcsuil/26154147384/in/dateposted-public/
[/img]


the link is an example
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Sun May 01, 2016 5:16 pm     Reply with quote

Hi,

Well, I'd say it's because you have neglected to tell the compiler the clock you are using upon which the delay_ms is calculated. You are also missing your fuses!

So, you need something like this:

Code:

#include <16F877a.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)


This should allow the code to compile, but it may not match your actual hardware configuration. This code is for an external 20MHz crystal.

Does that help the issue?
_________________
John

If it's worth doing, it's worth doing in real hardware!
Andr3s



Joined: 01 May 2016
Posts: 4

View user's profile Send private message

PostPosted: Sun May 01, 2016 5:21 pm     Reply with quote

if that happens thanks is all afternoon looking for other options and was so thank you very much for the solution


thank you very much
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