| ??? 10/07/02 12:25 Read: times |
#30314 - RTXTINY for 8051 |
hello all,
i am trying to incorporate rtxtiny to blink two LEDs connected to 90h and 91h. it is written in keil µvision2 the code is as follows, #include<rtx51tny.h> job0 () _task_ 0 { os_create_task(1); while(1) { #pragma asm setb 91h mov r0,#0xff mov r1,#0xff up1: nop djnz r1,up1 djnz r2,up1 clr 91h mov r0,#0xff mov r1,#0xff up2: nop djnz r1,up2 djnz r2,up2 #pragma endasm } } job1 () _task_ 1 { while(1) { #pragma asm setb 90h mov r0,#0xff mov r1,#0xff up3: nop djnz r1,up3 djnz r2,up3 clr 90h mov r0,#0xff mov r1,#0xff up4: nop djnz r1,up4 djnz r2,up4 #pragma endasm } } ------------------------------------------------------ The disassembly of the above program is given below. the problem is LED connected to 90h glows continuously and not according to what i expect in the above program. that program should blink LED connected to 90h and 91h. 8051 Disassembly of go.hex ; org 0 ; X0000: mov r7,#1 lcall X0000 /// why this lcall is used here? // X0005: setb p1.1 mov r0,#0ffh mov r1,#0ffh X000b: nop djnz r1,X000b djnz r2,X000b clr p1.1 mov r0,#0ffh mov r1,#0ffh X0016: nop djnz r1,X0016 djnz r2,X0016 sjmp X0005 ; X001d: setb p1.0 mov r0,#0ffh mov r1,#0ffh X0023: nop djnz r1,X0023 djnz r2,X0023 clr p1.0 mov r0,#0ffh mov r1,#0ffh X002e: nop djnz r1,X002e djnz r2,X002e sjmp X001d ; ; ; end please suggest me how to operate on this. this is the first time i am using RTOSTINY. regards, hemanth |
| Topic | Author | Date |
| RTXTINY for 8051 | 01/01/70 00:00 | |
| RE: RTXTINY for 8051 | 01/01/70 00:00 | |
| RE: RTXTINY for 8051 | 01/01/70 00:00 | |
| RE: RTXTINY for 8051 | 01/01/70 00:00 | |
RE: RTXTINY for 8051 | 01/01/70 00:00 |



