??? 03/29/04 13:14 Read: times |
#67583 - RE: infrared remote control detection Responding to: ???'s previous message |
hi,
You may use timer2 as counter (bit CT/2# of TCON2). This way input frequence should be provided to pin T2. Now, I think either timer0 or timer1 works on constant frequence, does it? If so then insert additional code into its ISR. The idea (for example, we implement extra code into ISR of timer 1): - program starts. It clears TH2/TL2 and configures timer 2 as counter of external events on pin T2. - timer 1 interrupt comes; - it refreshes LED display, reads TH2/TL2 values then processes and clears it. Knowing timer1 frequence it is possible to determine input frequence which comes to T2 pin. For example, if timer 1 runs at 1kHz (1ms) and TH2/TL2 contains 100 then it means that input frequence is 100kHz. Regards, Oleg |
Topic | Author | Date |
infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection![]() | 01/01/70 00:00 |