Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Code not working after reset in 8051

Status
Not open for further replies.

jovin555

Advanced Member level 4
Joined
May 20, 2012
Messages
115
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,036
I am using 8051 development board with 89v51rd2.When i upload a code the board is working properly.but after a reset the code is not working.i first uploaded a running led code.its working properly.but after a controller reset the led just glows.no change.can anyone explain me what may be the cause?
 

If you are using serial communication (RS232) cable disconnect from the development board after loading the program into the micro controller..

Post your code..
 

Still not working.It was an example code with the kit.
Code:
; This program is to test LED display using 8051 prototype board 
; 8 Led blink for a second ( 11.057 mhz)

;P1=data pin


org 00h
sjmp main

org 050h
main:

mov p0,#00h
mov p1,#00h
mov p2,#00h
mov p3,#00h




setb p1.0
acall delay
clr p1.0
acall delay

setb p1.1
acall delay
clr p1.1
acall delay

setb p1.2
acall delay
clr p1.2
acall delay

setb p1.3
acall delay
clr p1.3
acall delay

setb p1.4
acall delay
clr p1.4
acall delay

setb p1.5
acall delay
clr p1.5
acall delay

setb p1.6
acall delay
clr p1.6
acall delay

setb p1.7
acall delay
clr p1.7
acall delay

mov p1,0ffh
acall delay
acall delay
mov p1,00h
acall delay
acall delay
mov p1,0ffh
acall delay
acall delay



sjmp main


;-------------------delay program------------------------			
DELAY:
       			
	  MOV  TMOD,#010H     
          MOV  R3,#04H					;95        
TES:      MOV  TL1,#00H					;00        
          MOV  TH1,#00H					;00        
          SETB TR1           
T  :      JNB  TF1,T  
          CLR  TR1            
	  CLR  TF1               				 
          DJNZ R3,TES
          RET 
;---------------------end-------------------------------------                  
			         
 
          

end
 

Your code was working good...

Increase the delay and check once again.

Post your schematic...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top