ronak4409
Newbie level 2
- Joined
- Mar 4, 2013
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,314
Hi,
I am working on a code sequence which requires decoding of the RC-5 format stream decoding received from the TV remote. I am using the TSOP 1738 and P89V51RD2 controller for it.
The algorithm I have used is as follows:
1. Initialize all the ports and the interrupt for falling edge.
2. Wait for the falling edge to occur ( or to say wait for the signal stream )
3. (In the ISR routine) Disable the interrupts
4. (In the ISR routine) Poll the same pin and wait until its high
5. (In the ISR routine) Once it goes low, delay for 4.7ms (to skip the initial 3 bits)
6. (In the ISR routine) Loop1 (limit 5 times) to get address
7. (In the ISR routine) (in the loop1) delay 1.7ms, counter++ and detect 1 or 0 and store
8. (In the ISR routine) Loop2 (limit 6 times)
9. (In the ISR routine) (in loop2) delay 1.7ms, counter++ and detect 1 or 0 and store
Is this the right flow I am using, because I am not getting apt results.
Please guide.
I am working on a code sequence which requires decoding of the RC-5 format stream decoding received from the TV remote. I am using the TSOP 1738 and P89V51RD2 controller for it.
The algorithm I have used is as follows:
1. Initialize all the ports and the interrupt for falling edge.
2. Wait for the falling edge to occur ( or to say wait for the signal stream )
3. (In the ISR routine) Disable the interrupts
4. (In the ISR routine) Poll the same pin and wait until its high
5. (In the ISR routine) Once it goes low, delay for 4.7ms (to skip the initial 3 bits)
6. (In the ISR routine) Loop1 (limit 5 times) to get address
7. (In the ISR routine) (in the loop1) delay 1.7ms, counter++ and detect 1 or 0 and store
8. (In the ISR routine) Loop2 (limit 6 times)
9. (In the ISR routine) (in loop2) delay 1.7ms, counter++ and detect 1 or 0 and store
Is this the right flow I am using, because I am not getting apt results.
Please guide.