Maker Pro
Maker Pro

hitech compiler delays

juantravel

May 14, 2010
41
Joined
May 14, 2010
Messages
41
I was working on getting the delay functions in the hi-tech c library to work. This is my code:

Code:
#include <htc.h>
#define _XTAL_FREQ 4000000UL
void main(void)
{
 while(1)
	{
     TRISIO = 0x00;
	 GPIO = 0xff;
     _delay_ms(1000);
	 GPIO = 0x00;
     _delay_ms(1000);
	 }

}

The error I get is:

Error [499] ; 0. undefined symbol:
__delay_ms(driving_stepper.obj)

********** Build failed! **********


I have read the manual over and over. I have tried changing the function name, even tried changing the _XTAL_FREQ to 4000000 even 4MHZ.

If anyone has time to look at my code I will highly appreciate it. Im going to keep reading on it.

Thanks , juantravel



Got it working!! :) Too many 0's in the _XTAL_FREQ and it was calling error becuase the delay reached the limit.
 
Last edited:
Top