This application report describes the use of Timer_A3 to decode RC5 and SIRC TV IR remote control signals. The decoder described in this report is interrupt-driven and operates a background function using specific features the Timer_A3. Only a small portion of the MSP430 CPU?s nonreal-time resources is used. Specific hardware bit-latching capabilities of the Timer_A3 module are used for real-time decoding of the IR data signal, independent
and asynchronous to the CPU. CPU activity and power consumption are kept to an absolute minimum level. The Timer_A3 decoder implementation also allows other tasks to occur simultaneously if required. The solutions provided are written specifically for MSP430x11x(1) and MSP430x12x derivatives, but can be adapted to any other MSP430 incorporating Timer_A3.
電視遙控器設計基於MSP430
DATA: it_header TYPE bapibus1006_head OCCURS 0 WITH HEADER LINE.
DATA: it_centr TYPE bapibus1006_central OCCURS 0 WITH HEADER LINE.
DATA: g_bp LIKE bapibus1006_head-bpartner.
DATA: g_cat LIKE bapibus1006_head-partn_cat VALUE 1 .
DATA: it_guid LIKE bus000___i OCCURS 0 WITH HEADER LINE.
DATA: it_custo LIKE bus000_eew OCCURS 0 WITH HEADER LINE.
DATA:BEGIN OF HEADDATA.
INCLUDE STRUCTURE BAPIMATHEAD.
DATA:END OF HEADDATA.
DATA:BEGIN OF PLANTDATA.
INCLUDE STRUCTURE BAPI_MARC.
DATA:END OF PLANTDATA.
DATA:BEGIN OF PLANTDATAX.
INCLUDE STRUCTURE BAPI_MARCX.
DATA:END OF PLANTDATAX.
READ TABLE XMKPF INDEX 1.
IF XMKPF-TCODE2 = MIGO_GR .
LOOP AT XMSEG.
DATA: it_header TYPE bapibus1006_head OCCURS 0 WITH HEADER LINE.
DATA: it_centr TYPE bapibus1006_central OCCURS 0 WITH HEADER LINE.
DATA: g_bp LIKE bapibus1006_head-bpartner.
DATA: g_cat LIKE bapibus1006_head-partn_cat VALUE 1 .
DATA: it_guid LIKE bus000___i OCCURS 0 WITH HEADER LINE.
DATA: it_custo LIKE bus000_eew OCCURS 0 WITH HEADER LINE.