| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		
			Andr3s
 
 
  Joined: 01 May 2016 Posts: 4
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				| delay_ms problems with the command | 
			 
			
				 Posted: Sun May 01, 2016 4:45 pm     | 
				     | 
			 
			
				
  | 
			 
			
				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: 9589 Location: Greensville,Ontario 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Sun May 01, 2016 4:54 pm     | 
				     | 
			 
			
				
  | 
			 
			
				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
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		 | 
	
	
		  | 
	
	
		
			Andr3s
 
 
  Joined: 01 May 2016 Posts: 4
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		 | 
	
	
		  | 
	
	
		
			ezflyr
 
 
  Joined: 25 Oct 2010 Posts: 1019 Location: Tewksbury, MA 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Sun May 01, 2016 5:16 pm     | 
				     | 
			 
			
				
  | 
			 
			
				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
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Sun May 01, 2016 5:21 pm     | 
				     | 
			 
			
				
  | 
			 
			
				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 | 
			 
		  | 
	
	
		  | 
	
	
		 |