HI ERIK AND DHAVAL SOLANKI
PLEASE CLARIFY ME THE MISTAKE I VE DONE HERE, THIS THE PROGRAM TO INTERFACE FOUR SEVENSEGMENT LEDS (MULTIPLEXING), IN THIS PROGRAM THE DATA WHICH IS STORED IN 90H,91H,92H,93H ARE NOT DISPLAYED IN PORT P1. PLEASE GIVE ME YOUR SUGGESTION, NO ERROR DISPLAYED BUT THE ANSWER IS NOT OBTAINED
;COUNTER PROGRAM ORG 0000H LJMP MAIN ;------------------------------------- ORG 000BH LJMP T_I_CALC ;------------------------------------- MAIN: MOV R2,#0 MOV R3,#0 MOV R4,#0 MOV R5,#0 MOV TMOD,#00000001B MOV TL0,#00H MOV TH0,#0FFH MOV IE,#10000010B SETB TR0 ;------------------------------------- L1: MOV P2,#11110111B MOV R0,93H MOV P1,@R0 MOV P2,#11111011B MOV R0,92H MOV P1,@R0 MOV P2,#11111101B MOV R0,91H MOV P1,@R0 MOV P2,#11111110B MOV R0,90H MOV P1,@R0 ; MOV R6,#0FFH ;L10: MOV R7,#0FFH ;L9: DJNZ R7,L9 ; DJNZ R6,L10 SJMP L1 ;-------------------------------------- T_I_CALC: CLR TF0 CLR TR0 CLR A MOV A,R2 MOV DPTR,#DAT MOVC A,@A+DPTR MOV 90H,A INC R2 CJNE R2,#10,L4 L4: JC L5 MOV R2,#0 CLR A MOV A,R3 MOVC A,@A+DPTR MOV 91H,A INC R3 CJNE R3,#10,L6 L6: JC L5 MOV R3,#0 CLR A MOV A, R4 MOVC A,@A+DPTR INC R4 MOV 92H,A CJNE R4,#10,L7 L7: JC L5 MOV R4,#0 CLR A MOV A,R5 MOVC A,@A+DPTR INC R5 MOV 93H,A CJNE R5,#10,L8 L8: JC L5 LJMP MAIN ;--------------------------------------- L5: MOV TL0,#000H MOV TH0,#0FFH SETB TR0 RETI ;----------------------------------------- DAT: DB 0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H ;----------------------------------------- END ;-----------------------------------------
if some code (your other post gives an assembler error), you learn NOTHING by "doing it another way" if you do not resolve your problems by figuring out the reason, you will NEVER make any progreaa
THANK YOU FOR YOUR BEST COLLECTIONS,I TRIED TO FIGURE OUT THE PROBLEM IN SO MANY WAYS, IT DID NOT WORK PROPERLY, STILL EVEN AFTER MAKING CORRECTION AS PER YOUR QUOTE "#" IT DOES NOT WORK .SURE I WILL GO THROUGH YOUR COLLECTIONS
ERIK, I TRIED WITH THE ABOVE SAME PROGRAM BY USING REGISTER BANK0 AND BANK1 ALTERNATIVELY , WHILE SWITCHING OVER FROM RS0 TO RS1 IT GENERATES SOME RANDOM VALUES IN RS1 REGISTERS, DO YOU KNOW CAUSE?
yes, but I am not going to do your homework for you. Refer to "the bible" and find out. Stop typing with all capitals it is difficult to read and I do not like my eyes hurting.
Step1: Read the Architecture (more importantly internal RAM structure) of 8051 Step2: Read the addressing modes and then the instruction set.
You are trying to read the RAM location 93H. Let me ask you a question, "Are you sure that you can read that memory location of internal RAM?" Are you allowed to read/write the memory location above 0x7FH, that are not dedicated for SFR? If you dont have any idea, follow step1.
THANK YOU ERIK, I DONT NEED YOUR HELP, I DID NOT ASK YOU TO DO MY HOME WORK, JUST I CAME TO THIS FORUM FOR DISCUSSION AND CLARIFICATION, DONT BEHAVE LIKE YOU KNOW EVERYTHING,BUT ITS MY HABIT OF TYPING IN CAPITAL LETTER I CANT CHANGE THIS JUST FOR YOU.YOU NEVER THING TO CHATT TO ME LIKE THIS FURTHER, DONT YOU HAVE MANNERS?USE LIMITED WORDS.
here again is one of those posts "I want help for free, but darn it, I want it on MY conditions".
Erik, I am so sorry yaar, but one think is true that you are a wise man in micro controller.I accept that.As my apology, look at in this comment, i ve used everything in small letters except the noun.......sorry genius...dont forgive me but forget my last comment
View all questions in Keil forum