This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A student

i use the keil uvision3 which can be use for c source code and assembler.each time i write a code in A51 i keep getting error in trying to build it(target not created i.e the error message)whic i thought the error is that i dont know the type of header to use in a51 just like we use #include <> in c51.pls try to give me solution to this.

Parents
  • you can also reference their "TEMPLATE.A51" file:

    C:\...\Keil\C51\ASM\TEMPLATE.A51

    Just a re-write...

    #INCLUDE <REG52.h>
    
    BACK:
       mov   A,#(55h)
       mov   P1,A
    
       ACALL DELAY
    
       mov   A,#(AAh)
       mov   P1,A
    
       ACALL DELAY
    
       SJMP  BACK
    
    DELAY:
       mov   R0,#(11)
    H1:
       mov   R1,#(248)
    H2:
       mov   R3,#(255)
    H3:
       DJNZ   R3,H3
       DJNZ   R1,H2
       DJNZ   R0,H1
    RET
    
    END
    

    My preference is to localize the .INC or .H file so it is located with the general source code directory, thus keeping the whole program intact:

    #include "REG52.h"

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Reply
  • you can also reference their "TEMPLATE.A51" file:

    C:\...\Keil\C51\ASM\TEMPLATE.A51

    Just a re-write...

    #INCLUDE <REG52.h>
    
    BACK:
       mov   A,#(55h)
       mov   P1,A
    
       ACALL DELAY
    
       mov   A,#(AAh)
       mov   P1,A
    
       ACALL DELAY
    
       SJMP  BACK
    
    DELAY:
       mov   R0,#(11)
    H1:
       mov   R1,#(248)
    H2:
       mov   R3,#(255)
    H3:
       DJNZ   R3,H3
       DJNZ   R1,H2
       DJNZ   R0,H1
    RET
    
    END
    

    My preference is to localize the .INC or .H file so it is located with the general source code directory, thus keeping the whole program intact:

    #include "REG52.h"

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Children