This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

first project on uvision2 not working.

I have created my first project and I have included only one file, which is very simple, and here is the contents of it.

 /*This program demonstrates the use TCON and TMOD SFR. */

#include <REG51F.H>
#include <stdio.h>

void wait (void)  {                   /* wait function */
  ;                                   /* only to delay for LED flashes */
}

void main (void)  {
   unsigned int delay_counter;

   /*Set 0th bit of TMOD register to indicate that the timer0 is running
   in 16-bit mode.*/
   TMOD = 0x01;

   /*Set 4th bit of TCON register to indicate timer0 to be running*/
   TCON = 0x0F;

   for(delay_counter = 100000; delay_counter<0;delay_counter--)
   {
      wait();
   }

   printf("THO is:%u, TLO is:%u\n");

   /*Check for overflow by checking whether 5th bit of TCON register is set.*/

   if (TF0 == 1)
   {
      printf("Timer overflowed\n");
   }

}


The error I am getting is

"Cannot open the file REG51F.H"

Please help as I am new to this tool.

Thanks
Ashwath

Parents Reply Children
No data