Hi,
I am trying to write a simple program with Timer 0 using C 18 compiler. Please have a look at the following code and the following error code and let me know where i am going wrong.
Code:
#include <p18f4520.h>
#include <timers.h>
#define DELAY 16000
void mian (void) <--------- Spelling Error -----------
{
TRISC = 0x00;
T0CON = 0b11000111;
while(1)
{
PORTC =0xFF;
TMR0 = 0;
while ( TMR0 < DELAY)
{
}
PORTC =0x00;
TMR0 = 0;
while ( TMR0 < DELAY)
{
}
}
} // end
the following are the build errors
D:\PIC Projects\Loops2\LOOPS2.C:15:Error [1105] symbol 'TMR0' has not been defined
D:\PIC Projects\Loops2\LOOPS2.C:15:Error [1101] lvalue required
Please help me on this.
regards,
G.Nathan