---
+ Post New Thread
Results 1 to 2 of 2
  1. #1
    Newbie level 1
    Points: 311, Level: 3

    Join Date
    Mar 2011
    Posts
    1
    Helped
    0 / 0
    Points
    311
    Level
    3

    Help Watchdog, timer, and interrupt for AT89s52

    Can anyone help? We need to use special function of the microcontroller like watchdog timer, timer, and interrupt for our project.

    We are using assembly language, we are going to use those in LED, 7 segment and LCD.

    I have here a sample program of our running lights of LED.
    Code:
    ORG     0H		; Start at address 00H
            JMP    START_MAIN	; Goto address 80H
            ORG     80H             ; Relocate Program at address 80H
    
    START_MAIN:
    	MOV	P0,#0FEH
    	CALL	DELAY
    	MOV	p0,#0FDH
    	CALL	DELAY
    	MOV	p0,#0FBH
    	CALL	DELAY
    	MOV	P0,#0F7H
    	CALL	DELAY
    	MOV	p0,#0EFH
    	CALL	DELAY
    	MOV	p0,#0DFH
    	CALL	DELAY
    	MOV	P0,#0BFH
    	CALL	DELAY
    	MOV	p0,#07FH
    	CALL	DELAY
    	JMP	START_MAIN
    
    DELAY: MOV     	R2,#10		; Loop Register R2 = 3
    ALOOP: MOV     	R3,#150		; Loop Register R2 = 3
    BLOOP: MOV     	R4,#150		; Loop Register R2 = 3
    CLOOP: DJNZ    	R4,CLOOP	; Decrement R0 and go CLOOP if not yet '0'   
           DJNZ    	R3,BLOOP	; Decrement R0 and go BLOOP if not yet '0' 
           DJNZ    	R2,ALOOP	; Decrement R0 and go ALOOP if not yet '0' 
           RET                      ; Return back the last caller
    
    	END			; Instruct ASM that Program Ends here
    Can anyone help us? 1 watchdog for that program, interrupt and timer, Can anyone help me

    •   Alt31st March 2011, 08:54

      advertising

        
       

  2. #2
    Advanced Member level 4
    Points: 7,982, Level: 21

    Join Date
    Apr 2010
    Posts
    1,207
    Helped
    244 / 244
    Points
    7,982
    Level
    21

    Re: Help Watchdog, timer, and interrupt for AT89s52

    please consult atmel or philips 8952 manual .
    which gives the process of using them.



+ Post New Thread
Please login