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
The crucial question to ask yourself would be: where did you gather the idea that #include <reg51f.h> should work, in the first place? Given the fact that it quite obviously doesn't, that points the blame at the source of that information, until you find a better explanation.