hi,
 
i am trying to use indirect addressing in PIC16f877. i tried code like this
 
#include<p16f877.h>
void main()
{
    int i;
    FSR=0x70;
   
    for(i=0;i<10;i++)
    {
        INDF=0x41+i;
        FSR++;
    }
}
 
but the assembler (GPASM) gives error like this
 
test2.asm:19:Error [156] Operand must be an address label (_INDF).
Processor: 16f877
 
in asm file INDF is declared as global. when i comment this line
"global _INDF" in asm file the code works as i hope. but i want to solve this from C itself. I have to use indirect addressing in many of my projects.
 
thanking you all
Sunil



Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.