 | Discussion Forum |  |
|
|
help on keilNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author santosh ratan kumar Posted 31-Jan-2006 02:52 GMT Toolset C51 |  help on keil santosh ratan kumar hello frds,
i am new to keil and i like work mostly in assembly but when i wrote program for approx 1 second delay i had got 3 warnings please help me to get good knowledge on programing in assembly please i will also post my code for 1 second delay and also what warnings i got when i build target please check the code if it is approx for 1 second.
and here is the code
/* THIS IS PROGRAM FOR GENERATING ONE SECOND DELAY AND I AM GOING TO USE REGISTERS A,R1,R2 */
ORG 00H MOV A,#00H // 1 MACHINCE CYLE// START: MOV P1,A // 1 MACHINE CYLE// MOV P2,A MOV P3,A ACALL SECOND // 1 MACHINE CYCLE// CPL A // 1 MACHINE CYCLE// SJMP START // 1 MACHINE CYCLE//
/* APPROXIMATELY 1 SECOND DELAY PROCEDURE FOR CRYSTAL 11.0592 MHZ */
/*THE BELOW PROCEDURE UPTO 1SEC TAKES 4 MACHINE CYLCES*/
SECOND: MOV R1,#255 MOV R2,#7 MOV R3,#18 MOV R4,#255 /*THE BELOW LO0P FOR 1SEC TAKES 130305 MACHINE CYCLES*/
SEC: DJNZ R4,SEC // 2 MACHINE CYLCES INTO 255,510 MACHINE CYCLES// MOV R4,255 // 1 MACHINE CYLCE // DJNZ R1,SEC // 2 MACHINE CYCLE INTO 255,510 MACHINE CYCLES// DJNZ R2,SEC // 2 MACHINE CYCLES FOR 7 TIMES//
/*YHE BELOW LOOP FOR LE9465 TAKES 9465 MACHINE CYLCES*/
LE9465: DJNZ R4,LE9465 // 2 MACHINE CYCLES INTO 255,510 MACHINE CYCLES // MOV R4,255 // 1 MAVHINE CYLCLE// DJNZ R3,LE9465 // 2 MACHINE CYCLES FOR 18 TIMES// RET
END
here is the result which i got when i build target please help;
and i am not getting correct respone from simulators ports for delay
they are providing less than 1 second delay .please help.
i need accurate timings please and i also want to code in assembly only and get correct respones at ports in simulator.
please me to get good programming skills in assembly and use keil efficiently.
Build target 'Target 1' assembling robot.asm... linking... *** WARNING L5: CODE SPACE MEMORY OVERLAP FROM: 0000H TO: 0002H *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: ?C_START MODULE: STARTUP.obj (?C_STARTUP) *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: ?C_START MODULE: STARTUP.obj (?C_STARTUP) ADDRESS: 080AH Program Size: data=9.0 xdata=0 code=51 creating hex file from "robo"... "robo" - 0 Error(s), 3 Warning(s). | | Read-Only Author Andy Neil Posted 31-Jan-2006 07:19 GMT Toolset C51 |  Already answered Andy Neil You have already received an answer to this:
http://www.8052.com/forum/read.phtml?id=108734 | | Read-Only Author erik malund Posted 1-Feb-2006 14:00 GMT Toolset C51 |  RE: Already answered erik malund You have already received an answer to this but he did not like it
Erik | | Read-Only Author Reinhard Keil Posted 1-Feb-2006 14:36 GMT Toolset C51 |  RE: Already answered Reinhard Keil This should help: http://www.keil.com/support/docs/1980.htm | | Read-Only Author Reinhard Keil Posted 1-Feb-2006 14:38 GMT Toolset C51 |  RE: Already answered Reinhard Keil In addition you need also to learn about the assembler interface. So please also read: http://www.keil.com/appnotes/docs/apnt_149.asp
It sounds un-releated, but it is related also to this problem.
Reinhard | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|