We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
sir i am using keil uvision 3 and i am using windows 7 ultimate when i generate a hex file for the following code: MOV A,#38H ;INIT LCD 2 LINES 5X7 MATRIX
ACALL COMMAND ;ISSUE COMMAND
MOV A,#0EH ;LCD ON, CURSOR ON
MOV A,#01H ;CLEAR LCD COMMAND
MOV A,#06H ;SHIFT CURSOR RIGHT
MOV A,#80H;CURSOR: LINE 1, POS.6
ACALL COMMAND;ISSUE COMMAND
MOV TMOD,#20H ;TIMER 1, MODE 2
MOV TH1,#0fdh ;9600 BAUD @ 11.0592MHZ
MOV SCON,#50H ;8 BIT, 1 STOP BIT
SETB TR1 ;START TIMER 1
SCAN: JNB RI,SCAN ;WAIT FOR CHAR. TO COME IN MOV A,SBUF ;SAVE INCOME BYTE IN B ACALL DATA_DISPLAY ;DISPLAY DATA CLR RI ;TO SHOW THAT WE RECEIVED THE BYTE SJMP SCAN ;FETCH NEXT BYTE COMMAND: ACALL READY MOV P0,A CLR P1.5 ; rs=0 for command CLR P1.6 ; read write=0 SETB P1.7 ; enable=0 CLR P1.7 RET DATA_DISPLAY: ACALL READY MOV P0,A SETB P1.5 ;rs=1 CLR P1.6 ;write
SETB P1.7 ;enable=1 CLR P1.7 ;enable=0 RET READY: SETB P0.7 CLR P1.5 SETB P1.6 BACK: CLR P1.7 SETB P1.7 JB P0.7,BACK RET END
i am getting the followin hex code: :100000007438112A740E112A7401112A7406112AE7 :100010007480112A758920758DFD759850D28E30A7 :1000200098FDE5991137C29880F51144F580C29585 :10003000C296D297C297221144F580D295C296D229 :1000400097C29722D287C295D296C297D29720871D :02005000F92293 :00000001FF
actually when i dump the hex code into 89c51 ic this code is not working and i am sure that there are no errors in the code when i have created the hex code for the same above program in my friends system who uses windows vista home premium it generates the following hex code: :03000000020052A9 :0C005200787FE4F6D8FD758107020000FD :100000007438112A740E112A7401112A7406112AE7 :100010007480112A758920758DFD759850D28E30A7 :1000200098FDE5991137C29880F51144F580C29585 :10003000C296D297C297221144F580D295C296D229 :1000400097C29722D287C295D296C297D29720871D :02005000F92293 :00000001FF this hex code works fine in 89c51 ic and i get the output tooo so whats the problem sir
How can you be so sure?
You didn't notice the clear instructions on how to post source code:
www.danlhenry.com/.../keil_code.png
You didn't even notice that the code became an illegible mess when you previewed your post.
What makes you think your powers of observation are so much better when it comes to source code?
Have you tested your code in the Simulator?
actually when i dump the hex code into 89c51 ic this code is not working and i am sure that there are no errors in the code when i
Am I the only one seeing a problem with this statement...?