??? 02/15/06 07:35 Read: times Msg Score: -1 -1 Gimmee Code |
#110013 - please help me Responding to: ???'s previous message |
i think this will make helpful for readers to solve my problem please please provide me code to solve my problem, i hope after this some expert will give me code. i will be thankful
MOV R0,#09 ;skip 9 unused start,flip, and address bits MOV p1,0FFH ; make port P1 as IR input Port MAIN: JB P1.0,$ ;skip start bit JNB P1.0,$ ; skip flip bit DJNZ R0,MAIN MOV R0,#05 ; to save command bits CLR A ; MAIN2: call delay_900uc ; delay to start reading command bits MOV C,P1.0 ; get first bit and mov it to carry RLC A ; save 5 comming bit to A DJNZ R0,MAIN2 RLC A ; completing 8 bits of A RLC A RLC A CJNE A,#38,LABEL1 ; checks LABEL1: MOV P2,0FFH ; LABEL1: CJNE A,#39,LABEL2 MOV P2,00H ; toggle all P2 bits LABEL2: JMP MAIN ; delay_900us: TT0: MOV R2,#2 MOV R1,#152 TT1: DJNZ R1,TT1 DJNZ R2,TT1 NOP RET END |