Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/17/00 08:26
Read: times


 
#1864 - RE: Interrupt format and debug
Thank Your for Steve taylor and Abdul Rauf Jangda 's help. I would like to let you know more about my situation. I have to use assembly to control the 8051 microcontroller, and I use the software, uvision/51 for windows vision 1.32 and Toolset: Keil 8051 C Compiler V5.20 (Dll 1.32a) (DLL 1.32a). My interrupt program draft is shown as belows:

ORG 0000H ;Set the starting origin in RAM
JMP START ;Jump to label Start

ORG 000BH ;Interrupt Timer 0
JMP WAIT_INT5ms

START:

SETB PT0 ;Timer 0 Interrupt 1st Priority
SETB ET0 ;Enable Timer 0 Interrupt
SETB EA ;Enable all Interrupt

MOV A,#1
MOV B,#1


WAIT_INT5ms:

PUSH ACC
PUSH B
PUSH PSW
LOOP:
MOV TH0,#255 ;238High byte of 60,929 (238 * 256 = 60,928)
MOV TL0,#234 ;Low byte of 60,929 (60,928 + 1 = 60,929)
MOV TMOD,#01 ;Put Timer 0 in 16-bit mode
SETB TR0 ;Start Timer0
JNB TF0,$ ;Jump back to previous instruction if TF0 is not set
INC A
CLR TF0
CJNE A, #10, LOOP
POP PSW
POP B
POP ACC
RETI
END

I don't know what's wrong with it when I debug by dScope. the interrupt section was not read by the debug.
Please tell me that there is any mistake in my program or it is a problem that I did not make the setting of program in a correct way. Because I really know a little bit about this software! Thanks for everyone!!

List of 4 messages in thread
TopicAuthorDate
Interrupt format and debug            01/01/70 00:00      
RE: Interrupt format and debug            01/01/70 00:00      
RE: Interrupt format and debug            01/01/70 00:00      
RE: Interrupt format and debug            01/01/70 00:00      

Back to Subject List