Connect with us

MikroC programming problem

Discussion in 'Microcontrollers, Programming and IoT' started by jameschia, Oct 18, 2011.

Scroll to continue with content
  1. jameschia

    jameschia

    14
    0
    Oct 18, 2011
    I am using PIC16F877A to build a Ultra Sonic Sensor. i fail to compile my program due to some error.
    can anyone tell me the function of MOVF because i cant find any relevant info from the mikroC manual.
    i have uploaded my program and the error during compile. any idea about whats going wrong? Untitled.jpg

    View attachment code.txt
     
  2. jackorocko

    jackorocko

    1,284
    1
    Apr 4, 2010
    http://www.edaboard.com/thread193108.html#post809661 Does this help much? I don't know where stack_2 comes from

    Did you write all that code yourself?
     
    Last edited: Oct 18, 2011
  3. jameschia

    jameschia

    14
    0
    Oct 18, 2011
    jackorocko:
    i am trying to modified the program of others.
    according to the compiler, it stated "undeclared identifier 'STACK_2' in expression"
    but i din have idea what the STACK is, either it is a register inside the PIC or a variable that we need to create by ourself.
    any idea?
     
  4. jackorocko

    jackorocko

    1,284
    1
    Apr 4, 2010
    I would say you need to create it. It must have been someone else's constant variable if they followed standard convention. But I am not really sure what the code is trying to do, so I don't really have a guess on what the variable would have been exactly.

    I don't know too much asm
     
    Last edited: Oct 18, 2011
  5. motzey

    motzey

    3
    0
    Feb 2, 2010
    I believe the MOVF instruction is an assemble lang. type of instruction. The MikroC
    is a high level lang. you can't mix the two lang.
     
  6. jackorocko

    jackorocko

    1,284
    1
    Apr 4, 2010
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-