| ??? 01/28/00 07:46 Read: times |
#1331 - IR tranmission Help reqd. |
Dear Fellows:
I am trying to transmit a number, which I get from keyboard matrix, stored in a location at internal RAM called K_NUM, and now sending it out by using IR LED. The transmission is happening bit by bit but problem I am facing is that on Receiver side, I am using an IR module which normally used in TV etc. This is a small metal box. IT receives the pulse burst (pulse train) and converts this as high signal and no pulse burst converts as low signal. i.e. pulse burst presents = 1 pulse burst not presents = 0. The actual problem is that I am unable to control the appropriate pulse width. This is important that I want to poll an I/O pin for high and low signal detection at the receiver end, and I would need an accurate pulse width for 1s and 0s. Please look at the code as follows and if some of you can help me resolving the problem. TX: PUSH ACC ; save accumulator to stack PUSH PSW ; save flags status to stack CLR C ; clear carry MOV BIT_CNT,#09h ; load bit_cnt by 8bits +1 MOV A,K_NUM ; load accumulator with key number. SETB ACC.6 ; set bit 7 of accumulator by 1. TX_STRT: DJNZ BIT_CNT,CHK_A7 ; chk if all bit not sent goto next bit. TX_END: POP PSW ; other wise prepare to exit, pop PSW POP ACC ; POP Acc. AJMP TO_KEY_BRD ; go back to keyboard routin CHK_A7: MOV CARR_CNT,#010h ; load burst (pulse train) counter JNB ACC.7,SND_LO ; if bit7 of acc. is not 1 then goto SND_LO. SND_HI: CLR IR_TX ; send low carrier to bit IR_TX NOP SETB IR_TX DJNZ CARR_CNT,SND_HI ; go again if chk if pulse train has completed, RL A ; rotate accumulator 1 bit left. AJMP TX_STRT ; goback to start IR tranmit. SND_LO: CLR IR_TX ; send low carrier to bit IR_TX NOP DJNZ CARR_CNT,SND_LO ; go again if chk if pulse train has completed, RL A ; rotate accumulator 1 bit left. AJMP TX_STRT ; goback to start IR tranmit. END Thanx a ton Rauf microlnk@emirates.net.ae ardxb@hotmail.com |
| Topic | Author | Date |
| IR tranmission Help reqd. | 01/01/70 00:00 | |
| RE: IR tranmission Help reqd. | 01/01/70 00:00 | |
RE: IR tranmission Help reqd. | 01/01/70 00:00 |



