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
The error I am getting is "Cannot open the file REG51F.H" Please help as I am new to this tool. Thanks Ashwath
"I have created my first project ... I am new to this tool." Did you read the "Getting Started with µVision2 and the C51 Microcontroller Development Tools" manual? Did you work through the example projects in it? If not, I suggest that you should do that first - then come back to your own project when you're no longer entirely new to the tools!