Connect with us

hitech compiler delays

Discussion in 'Microcontrollers, Programming and IoT' started by juantravel, Nov 12, 2010.

Scroll to continue with content
  1. juantravel


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

    #include <htc.h>
    #define _XTAL_FREQ 4000000UL
    void main(void)
         TRISIO = 0x00;
    	 GPIO = 0xff;
    	 GPIO = 0x00;
    The error I get is:

    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: Nov 12, 2010
  2. barathbushan


    Sep 26, 2009
    the while loop looks ok , can you check the header file ??
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day