Home
Microcontrollers Application Note XC800 Family AP08121
Contents
1. IR Receiver Socket and Display t C S IR Transmitter Programmer Connector H I i o 1 9 A paa 1 st 16 S PAA 2 15 Kee PA 3 8 MCU_SELECT 1 2 i PALA 4 13 1 3 1 pa 4 5 12 i pas 6 11 1 DL e T 10 ai 1 G GND Kn TT Sn rn Sr Z PC_RXD TXD 1 4 SUS als lt gd MBC 1 5 l 4 1 RST 1 6 l a s g al s 8 mi Hu EI i M D Ze PC_TXD 1 7 i A af oa oa a Gd Se I SPD 1 8 l VAYA AN AN AN gt SI 3 3 3 3 8 DC SELECT E l 2 S S I BD 2 k W ga N I le l SE i 1 GND PC_RXDCTXD l i l I PREE PEINE EEEE A A AAN EE ee ee ee ee ee oe ee eee eee 4 USB Interface O O RUN SA Q full duplex Ta e MBC Ste 1 l N Sle LBC TRD gt R10 15 i a sel a CN lt PC_RXD TXD EA ai S al half duplex ea PC_RXD TXD Ica BSL DTN i X25 3V o o K 1N4148W9 zt r 1 a kad 1 S R11 2k7 DE Vi H N S 2 l 2 SW oc ne 0 l UE DU U O l 1 SA l c1 c2 100n cl Kaes 10n l c3 i 1 c4 100n Troon l aie aE 3 2 i GND GNDGND GND GND GND J TITLE USB UART Document Number REU 2010 52 Date 28 12 2010 21 14 52 Sheet 1 1 Figure 39 USB Docking Station Schematics Application Note 33 V1 0 2011 02 SC ee AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Schematics and Layout Jp2 as ez eR en eR ei D CR OD
2. lt a AP08121 In fi neon Infrared Remote Controller with Capacitive Touch Interface Monitoring Table 2 U SPY to Microcontroller Transmitted Data Format DO D1 Value hex 08 XX Description LD Button no Based on this data received by the receiver board the display mode can be switched between Angle and Brightness Control via the toggling of a bit data in the code Status Flags The statuses of the LEDs received by U SPY are masked before they are displayed as status flags It is important that the bits of a mask do not overlap with the bits of another mask This is to ensure that status flags are not falsely turned on The masks used are as follows Table 3 Table 3 LED masks for Status Flags LED 1 2 3 4 5 Right 6 7 Left 8 Number Button Button Mask 20 hex Progress Bars Channel and Volume Brightness are displayed as progress bars Channel increases with the press of the right button and decreases with the press of the left button Volume Brightness increases with the clockwise dialing of the wheel and decreases with the anti clockwise dialing of the wheel 7 5 RemoteControl_ TouchSense amp WheelE valuation ini This settings file Figure 35 is customized to allow the user to monitor parameters of the Touch Wheel Library and the LEDTS ROM Library Note This settings file is to be used with the transmitter board plugged in to the USB docking station Application Note 28 V1 0 2011 02 SC re AP08
3. y DG Se resorte intialize bitnumber 0 beginning of bit wait for falling edge beginning of a N e new packet has it been roughly 1 778ms N bitnumber 1 has it been Y roughly 0 889ms HN shift 1 to packet from d right LSB it has been 2 chips bitend 0 Vv middle of the bit y wait for rising edge Vv it has been 1 chip noise gt reinitialize toggle bitend e middle of the bit was it a falling edge Y v e N shift 1 to packet from shift 0 to packet from right LSB right LSB e y increment bitnumber it v wait for falling rising edge if it was a rising falling one bitnumber 14 Y v evaluate received packet N gt lt Y Figure 16 IR reception code sections Application Note 14 V1 0 2011 02 AP08121 ee infi neon Infrared Remote Controller with Capacitive Touch Interface Infrared Communication Once the RC 5 packet is received the microcontroller determines whether it contains new button information calibration information or a new angle On the USB Docking Station LED7 shows the status of the left button turned on if touched and turned off if untouched and LED5 shows the status of the right button By default the 6 other LEDs show the angle of the wheel The brightness of the LED
4. 29 V1 0 2011 02 AP08121 Infrared Remote Controller with Capacitive Touch Interface Infineon Monitoring The data received by the microcontroller will be used to determine the signals that will be transmitted to U SPY for display on the oscilloscope Oscilloscope The oscilloscope function allows the user to monitor up to 3 signals at a time As mentioned in the previous section the user is able to monitor four different types of signals in this settings file The signals displayed in each mode are as follows Table6 Left Right Button Table7 Wheel Avr Tables Angle Amp Table 6 Signals Displayed for Left Right Button Signal1 Signal2 Signal3 Description Pad Total TSCTR Pad Average None QDIVISORN Colour Green Pink Yellow Table 7 Signals Displayed for Wheel Avr Signal Signal2 Signal3 Description Wheel Pad1 Average Wheel Pad2 Average Wheel Pad3 Average Colour Green Pink Yellow Table 8 Signals Displayed for Angle Amp Signal1 Signal2 Signal3 Description Calculated Wheel Angle Wheel Amplitude None Colour Green Pink Yellow Application Note 30 V1 0 2011 02 Infineon AP08121 Infrared Remote Controller with Capacitive Touch Interface 8 Schematics and Layout Schematics and Layout IC XC822T AA VCC C2 Ti00n GND GND P2 O ANO EXINTO CCPOSI RX BJ P24 AN1 XINT1 CCPOS RST P2 2 AN2 EXINT2 MBC P2 3 AN3 EXINT3 CC Ek air alk ECH
5. 50 for the RC 5 protocol 773 generates an interrupt at the beginning end of every bit 773PM and it generates an interrupt right at the middle of the bit 773CM In the interrupt service routines ISR for these interrupts the microcontroller enables disables the carrier wave according to the packet to be transmitted Application Note 12 V1 0 2011 02 SC re AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Infrared Communication T13PM CC6 C T13CM CC6 C every 1 778 ms 889 us after T13PM y inc bitnumber i Set channel to ready Y Y once bitnumber has toggle R_output clear R_output reached 64 enable disable carrier wave COUT61 bitnumber lt 15 N according to R_output Y d Y v set clear IR_output if clear R_output MSB of packet is 0 1 4 Y shift packet left Y enable disable carrier wave COUT61 according to R_output Figure 15 IR transmission code sections 3 3 Reception The receiver IC TSOP34836 on the IR Receiver board de modulates and inverts the received infrared signal so whenever the carrier wave is active it will output 0 else it will output 1 see Figure 9 This signal is Manchester encoded and the microcontroller handles the decoding The output of TSOP34836 is directly connected to the T2EX input of the XC822MT microcont
6. Half Duplex Iqnore Echo v XRAM Flash ash Erase Target Device EST KRISS Chip info Exityuit HG COM Part BaudRate NAD NAC COMB v 19200 zi ied Fe Ox 00 d IS Connected Verify Programmed Flash Connected to Device Figure 30 XC800 Fload FLOAD can be used to access whichever board is plugged in to the USB Docking Station Application Note 24 V1 0 2011 02 SC re AP08121 In fi neon Infrared Remote Controller with Capacitive Touch Interface Programming Access Figure 31 IR Transmitter connected to USB Docking Station Figure 32 IR Receiver connected to USB Docking Station If both the R Transmitter and the IR Receiver are plugged in then the R Transmitter takes priority and it is the only one that can be accessed The XC822 boot configuration does not depend on any pin status during reset Instead a Boot Mode Index BMI configuration determines the entry to various boot modes such as User Mode Boot Loader BSL Mode and On chip Debug OCDS Mode After reset the BMI value is read and the respective boot mode entry is automatically executed The microcontrollers on the R Transmitter and IR Receiver boards are both programmed to User Mode Productive In this mode the Boot ROM jumps to the program memory address 0x0000 on startup to execute the user code in the Flash memory This mode provides Flash memory protection from external access read write Changing th
7. a failure of such components can reasonably be expected to cause the failure of that life support device or system or to affect the safety or effectiveness of that device or system Life support devices or systems are intended to be implanted in the human body or to support and or maintain and sustain and or protect human life If they fail it is reasonable to assume that the health of the user or other persons may be endangered AP08121 See In fi neon Infrared Remote Controller with Capacitive Touch Interface XC82x Revision History V1 0 2011 02 Previous Version none Page Subjects major changes since last revision DAVE is registered trademark of Infineon Technologies AG We Listen to Your Comments Is there any information in this document that you feel is wrong unclear or missing Your feedback will help us to continuously improve the quality of this document Please send your proposal including a reference to this document to mcdocu comments infineon com Application Note 3 V1 0 2011 02 SC re AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Table of Contents 1 INMOCUCUON WE 5 2 Hardware Setup and Basic Program FIOW css esssssseeeeeeessssseeeeeeessssseeeeeeeessseere resen 6 2 1 EC Fret a ches 6 2 2 IEE ROCONI OE ee 7 2 3 VSB Bole gle EE Le EE 7 2 4 Program re 8 3 Infrared Communication ssssssssssssssssssssseesss
8. the angle this operation needs the most computing performance To minimize error it is safer to use Ill if Yis larger and IV if Zis larger An offset of 1 and a scaling factor of 2 R are added to create a more usable calculated angle R is for resolution and corresponds to the number of left bitshifts on the numerator Vie oa Section 1 Left p 2x 2 Yz Y x2 i i D 1 Section 1 Right p YEZ Application Note 20 V1 0 2011 02 SC re AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Touch Interface X Y Z A MAXT Z 0 Y MAXT 2 0 2P 2 2R Groh Figure 26 Section 1 after offsetting and scaling Sections 2 and 3 In these two sections the angle can be calculated in a similar way as in section 1 using the two non constant signals Offsets of 4 and 7 and the same scaling factor can then be added to sections120 240 and 240 360 respectively to get a calculated angle of 0 9 2R for 0 360 Yx2 Section 2 Left 5x2 ection 2 Le p Xay xx R Section 2 Right 4x2 ection ig p X 4Y xXx Section 3 Left 8x2 ection 3 Le p vi Zx2 R Section 3 Right 7x2 ection ig p X47 angle 0 120 240 360 A Z Pg calculated angle 0 3 2P 6 2 CC Figure 27 Calculated angle vs real angle across all sections Application Note 21 V1 0 2011 02 SC re AP08121 infi neon Infrared Remote Controller with Capacitive Touch I
9. 0 data bits are also used e D2 is used as Calibration Bit C 1 if the Transmitter board is self calibrating e D1 is used as Right Button BR 1 if the right button is touched 0 if untouched e DO is used as Left Button BL 1 if the left button is touched 0 if untouched 1 1 T l 0 1 0 0 0 0 0 0 C BR BL a pn Figure 13 Button touch packet The Receiver board also has separate addresses for the wheel The RC 5 address is 11XXX The transmitted angle W8 W0 has 9 bits A2 A0 D5 D0 The value scales from 0 to 0x11F 0 287 decimal with 287 being 358 75 so A2 A0 can be 000 001 010 011 or 100 In other words the wheel uses 5 addresses 11000 11001 11010 11011 and 11100 The Receiver accepts all 11XXX addresses as wheel angle The Toggle Bit is changed every time a new angle is transmitted 1 1 T 1 1 W w7 W w5 WA w3 w2 WI wo Tum R DN Figure 14 Wheel angle packet 3 2 Transmission The R Transmitter transmits the packets on the COUT61 PWM output COUT67 drives the IR diode via a transistor see Figure 9 The carrier wave is enabled or disabled in two interrupts generated by CCU6 the high performance PWM unit of XC822 CCU6 contains two flexible 16 bit timers Timer 12 772 and Timer 13 773 e 712 generates the carrier wave with a period of 27 8 us and 25 or 5 duty cycle e 713 generates the timing for the transmitted chips with a period of 1 778 ms and a fixed duty cycle of
10. 121 infi neon Infrared Remote Controller with Capacitive Touch Interface Monitoring BEE File Edit View Config Tools Window Help coma ES ll x Oscilloscope Switches gt Reset Osc Close Osc Buttons E Left Button Right Button Wheel Avr Angle Amp C 4 Ready Disconnected 7 Figure 35 RemoteControl_TouchSense amp WheelEvaluation ini User Interface 7 5 1 Data Format In this settings file the data group transmitted to U SPY is solely for the display of signals on the oscilloscope The format of the data group also consisting of 8 data bytes is as follows Table 4 Table 4 RemoteControl_TouchSense amp WheelEvaluation ini Transmitted Data Format DataByte0 D0 D1 D2 D3 D4 D5 D6 D7 Value hex B3 B3 XX XX XX XX XX XX Description LD LD Signal Signal Signal2 Signal2 Signal3 Signal3 High Byte Low Byte High Byte Low Byte High Byte Low Byte The data group received by U SPY is then matched before it is displayed Buttons In this settings file the buttons allow the user to choose the signal which the user would like to monitor The description of the data format for the buttons is the same as in the previous settings file Data is transmitted in the following format Table 5 Table 5 U SPY to Microcontroller Transmitted Data Format DO D1 Value hex 08 XX Description LD Button no Application Note
11. OO CD ER Kei ire em LED Leos AED LEW KCHZZ IR Receiver m Figure 40 USB Docking Station Layouts and Components 10 SA XC822MT C103 4u7 6 3V GND 2010 52 XC822 Receiver IR Receiver 10 81 2011 23 40 03 Sheet 1 1 Figure 41 IR Receiver Schematics Application Note 34 V1 0 2011 02 Cinfineon AP08121 Infrared Remote Controller with Capacitive Touch Interface Schematics and Layout MCB 7 IR Receiver 2010 57 Figure 42 IR Receiver Layout Single Layer and Components Application Note 35 V1 0 2011 02 ee AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface References 9 References Users Manual XC82x 8 Bit Single Chip Microcontroller Data Sheet XC822 824 8 Bit Single Chip Microcontroller Application Note AP08100 Configuration for Capacitive Touch Sense Application Application Note AP08098 Low Power Modes with Periodic Real time Clock Wake up in XC82x XC83x Application Note AP08101 Current Consumption in Power saving Modes for Low Power Applications Application Note AP08108 Programming the BMI value in the XC82x and XC83x products Link to XC82x Series www infineon com xc82x Link to Solutions for advanced touch control www infineon com intouch Application Note 36 V1 0 2011 02
12. ak of at least 89 1 ms between them Each packet takes 24 9 ms to transmit Packet Packet 24 9ms gt 89 1ms gt 114ms Figure 11 Transmission of packets One packet contains the following bits and bit fields in order of transmission Start Bit S1 or S 1 bit always logic 1 Field Bit S2 or F 1 bit can be used as command extension always logic 1 in the R Remote Kit Toggle Bit T or C 1 bit toggles if new data is sent does not change if the same data is sent repeatedly e g a button is continuously touched Address A4 A0 5 bits MSB first selects the target device the R Remote Kit does not use the standard RC 5 addresses the Receiver board has multiple addresses instead o 01000 Touch buttons and calibration o 11XXxX Touch wheel Data D5 D0 6 bits MSB first one of the possible 64 commands the R Remote Kit does not use the standard RC 5 commands and this bitfield is used as general data e g wheel section angle 1 2 3 4 5 6 7 8 9 10 11 12 13 14 S1 S2 T A4 A3 A2 A1 An D5 D4 D3 D2 D1 DO A l A 1 778ms 889 us889 us 1 0 Figure 12 Bits of a typical packet Application Note 11 V1 0 2011 02 SC re AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Infrared Communication The Receiver board has a separate address for the buttons and calibration In this case the RC 5 address is 01000 the Toggle Bit and D2 D
13. ca XC800 Family AP08121 Infrared Remote Controller with Capacitive Touch Interface Application Note V1 0 2011 02 Microcontrollers Edition 2011 02 Published by Infineon Technologies AG 81726 Munich Germany 2011 Infineon Technologies AG All Rights Reserved LEGAL DISCLAIMER THE INFORMATION GIVEN IN THIS APPLICATION NOTE IS GIVEN AS A HINT FOR THE IMPLEMENTATION OF THE INFINEON TECHNOLOGIES COMPONENT ONLY AND SHALL NOT BE REGARDED AS ANY DESCRIPTION OR WARRANTY OF A CERTAIN FUNCTIONALITY CONDITION OR QUALITY OF THE INFINEON TECHNOLOGIES COMPONENT THE RECIPIENT OF THIS APPLICATION NOTE MUST VERIFY ANY FUNCTION DESCRIBED HEREIN IN THE REAL APPLICATION INFINEON TECHNOLOGIES HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND LIABILITIES OF ANY KIND INCLUDING WITHOUT LIMITATION WARRANTIES OF NON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY WITH RESPECT TO ANY AND ALL INFORMATION GIVEN IN THIS APPLICATION NOTE Information For further information on technology delivery terms and conditions and prices please contact the nearest Infineon Technologies Office www infineon com Warnings Due to technical requirements components may contain dangerous substances For information on the types in question please contact the nearest Infineon Technologies Office Infineon Technologies components may be used in life support devices or systems only with the express written approval of Infineon Technologies if
14. d and constant pressure constant effective finger area the pad average signals are expected to behave in a linear manner in this model as seen in Figure 20 Application Note 17 V1 0 2011 02 SC re AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Touch Interface 0 120 240 360 untouched_a untouched_c untouched_b Figure 20 Pad average signals of the three wheel pads during dialing Values untouched_a untouched_b and untouched_c are the pad average levels for pad A B and C respectively when they are not touched If the pads have roughly the same sensitivity the three signals can be tuned to have a common untouched level 0 120 240 360 untouched_a Figure 21 Pad average signals of the three wheel pads after tuning Figure 22 Actual pad average signals after tuning The now common untouched level is very high compared to the difference between touched and untouched states To make calculations easier the signals are transformed near to zero by linear combinations This also makes the transitions between angle sections smooth which is especially important if the three pads have different sensitivity or unstable untouched levels due to imperfect calibration or a changing environment _A B _At C BLC 2 X C Y B Z A Application Note 18 V1 0 2011 02 OP a AP08121 infi neon Infrared Remote Controller
15. e BMI value to enter another boot mode is achieved by programming a specific code embedded in the user code It is located in MAIN C at the MA N_main 2 section This section only gets executed once after RESET This code checks GPIO pin P2 1 MBC emulation and if it is low a Boot ROM routine is called to re enter UART Boot Loader Mode Once UART Boot Loader Mode is entered the user can change the contents of the Flash memory This specific user code must be present in Flash and executed under certain conditions to ensure that programming the microcontroller is possible RESET happens during power on and is also emulated on pin P2 2 Pulling down P2 2 momentarily generates an interrupt External Interrupt 2 and the interrupt service routine generates a software RESET The FTDI chip on board the USB Docking Station automatically controls these pins when the user tries to access the microcontrollers with FLOAD Application Note 25 V1 0 2011 02 SC ee AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Monitoring 7 Monitoring 7 1 U SPY U SPY is a UART terminal program which allows the user to view a serial communication through a PC serial port lts features include transmission of a byte or group of bytes configuration of protocol for bytes transmission reception and creation of dedicated control buttons display fields progress bars and oscilloscope for better visualization For more information on U SPY
16. e received signal but decoding is handled by the receiving microcontroller TSOP34836 inverts the signal Protocol 36 kHz carrier 0 1 1 0 0 1 1 0 i lt a l l l l tf OS 0 1 1 0 1 0 0 1 ji 1 f i i i lep 0 0 1 0 1 1 0 3 Ges us 889 Us My TSML1000 CHIP CHIP 940 nm S N 36 kHz o H Siem ms Ki SS ee Se AGC Bang pass Demodulator XC822 BIT k ee pen con L S Noy L _ TSOP34836 IR Transmitter IR Receiver Figure9 Infrared Transmitter and Receiver By default when the R Transmitter board is powered by batteries 3V the 36 kHz carrier wave has a 25 duty cycle to reduce power consumption but still have enough transmitting power for acceptable range If the In Transmitter board is plugged into the docking station and is powered by the USB 5V the duty cycle is reduced to 5 to compensate for the higher diode current In both cases there are exactly 32 pulses in a chip Application Note V1 0 2011 02 AP08121 ee infi neon Infrared Remote Controller with Capacitive Touch Interface Infrared Communication Vin 3V ViN 5V 25 duty cycle 5 duty cycle 6 95 us 1 39 us 27 8us 27 8 us Figure 10 36 kHz carrier wave at 3V and 5V supply voltage The RC 5 protocol uses 14 bit packets for transmission The packets are transmitted one after another with a bre
17. eeeeeeeeeeeeeeee ee 10 3 1 Reese etic eens ncts sesezesscese26540e562654005426540646265406462604 0006060450462604504026045605260150452040000 00000202222 10 3 2 ATAMSIMUSSION EE 12 3 3 te e 13 4 Ree lune 17 4 1 Wheel Angle een lel 17 5 POWER SAVING EN 23 6 PrOGraMMING ACCOSS HHHH 24 7 Monitoring lH 26 7 1 Seah EE 26 7 2 ene 26 7 3 UART Inte rrupt cee ee eee 26 7 4 RemoteControl Rotation Im 26 7 5 RemoteControl_ TouchGense Wheeltvaluatton Im 28 8 Schematics and Layout ssssssssssseeeeeessssseereee essere reenn eenn eenn ennenen eenn 31 9 T 36 Application Note 4 V1 0 2011 02 SC re AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Introduction 1 Introduction In today s Human Machine Interface HMI designs touch buttons touch sliders and wheels are all important input elements The use of capacitive touch technology to create these elements gives flexibility a high level of customization and a significant reduction in overall system cost The design of mechanical buttons is complex and costly Cut off clearances must fulfill certain requirements in terms of thermal expansion and aesthetic perception while the material of the buttons and the electric contacts must be flexible reliable and persistent All these factors must be taken into consideration in the design along with the incorporation of other elements such as potentiometers to define the final size and shape of input butt
18. er 2 Overflow interrupt for calculations necessary to handle the touch wheel e The UART module which is part of the XC800 core is used for full duplex UART communication with the PC Application Note 8 V1 0 2011 02 SC ee AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Hardware Setup and Basic Program Flow IR Receiver Communication with the RC 5 protocol is very slow so it is not critical to set interrupt priorities although for high speed communication e g RF protocols it could be critical RESET ENTER BSL SOFTWARE RESET IR RECEPTION or Manchster decoding INITIALIZE ai N m i RETI Y e K BUTTON DISPLAY DO NOTHING S medium COMMUNICATION ANGLE DISPLAY WITH PC send data and Figure 8 Overview of the main functions and interrupts of the IR Receiver receive commands Modules used e Timer 2 T2 takes care of receiving and decoding the infrared signal and it generates a Timer 2 External interrupt every time there is a change in the incoming signal level e The Capture Compare Unit 6 CCU6 adjusts the brightness of the six wheel LEDs on the USB Docking Station and provides a slow time base by the Timer 13 Period Match interrupt for brightness level calculations e The UART module which is part of the XC800 core is used for full duplex UART communication w
19. er spends most of the time in idle or power down mode to limit power consumption Touch sense related tasks are performed with high priority each time pad capacitances have been measured Infrared transmission has a lower priority because of its very low speed while UART communication has the lowest priority because it is not time critical RESET 4 very high high ENTER BSL TOUCH SENSE or SIGNAL INITIALIZE PROCESSING Eo o 4 ENTER POWER BUTTON TOUCH DOWN DETECTION or IDLE MODE e medium medium low Y IR TRANSMISSION IR TRANSMISSION WHEEL ANGLE E ei Manchster encoding Manchster encoding CALCULATION send data and and modulation and modulation receive commands Y WHEEL CALIBRATION Overview of the main functions and interrupts of the IR Transmitter Figure 7 Only a few of the XC822MT modules are required to perform all the required functions with minimal CPU load e The LED Touch Sense Control Unit LEDTSCU handles the touch pads it generates a so called Time Frame interrupt after every measurement where signal processing and touch detection take place e The Capture Compare Unit 6 CCU6 drives the infrared LED for IR and generates the Timer 13 Period Match and the Timer 13 Compare Match interrupts e The Timer 2 72 module provides a slow time base by generating the Tim
20. face Programming Access 6 Programming Access The USB Docking Station provides programming access to the microcontrollers on both the IR Transmitter and IR Receiver boards when the onboard switch is set to the L position The USB Docking Station contains an FTDI chip FT232RL which acts as a USB to UART bridge and also controls the microcontoller s emulated MBC P2 1 and RESET P2 2 pins Programming access is wired for half duplex UART on pin P0 6 Flash content can be modified with the XC800 FLOAD tool which is integrated into DAVE BENCH and is also available in a stand alone version XC800_FLOAD V5 2 T GI File Menu Help SHITET Ts od Sk i SH Wii gt 0000 02 00 63 32 X XK KK Ka Ka Ka 32 KL KL KK 0010 X X a 32 KL SS Xa A A A I2 AS A A A 0020 x ss 02 O Ess ss Ka 32 NN SN K 00230 ss 32 KL SS SS Ka Ka 29 SS AS A 0040 Xx ss 02 08 B X ss NN 29 NN SN K 0050 X X X 02 02 Ess X X X 02 08 E 12 U 0060 B 80 F 75 81 9 12 0 F E 82 60 03 02 00 B 0070 79 00 E 44 00 60 1 7 00 43 A 01 90 0 F 5 0080 A F 90 F 00 E 43 A 01 93 A 53 A F F A 0090 P E Di E E E Fas DES EIS Zb Es F DAD 75 F 00 78 00 E 44 00 60 OF 79 OO E F 09 D 0060 F 78 00 E 44 00 60 0 79 00 90 F OO EE A DICH D EDF 75 34 40 BE Fa AE 28 EB F A E 00D0 4 EE AE 50 75 51 00 E F 52 F 53 E FY 4 II Protocol UART Open File Download Find Device Physical Interface Ge e SES
21. for flash programming or UART communication Application Note 6 V1 0 2011 02 SC ee AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Hardware Setup and Basic Program Flow 2 2 IR Receiver The IR Receiver device consists of an infrared receiver IC combined with the XC822MT microcontroller Next to the power supply pins 2 9V to 5 5V just one additional pin is required for the infrared receiver IC The remaining 12 lOs can be used for custom application signals The received signal is decoded using the T2 module of XC822 eoo0000000 XC822MT oo0o000000 Figure 4 IR Receiver 2 3 USB Docking Station The receiver board is plugged into a USB Docking Station which provides 5V power supply a USB to UART Bridge and eight signaling LEDs The LEDs can be driven by toggling IO pins or by PWM signals from XC822MT Oooooooo Oo xcs22mT e Rx 0000090090 Figure 5 USB Docking Station The default software of the kit uses the capture compare unit CCU6 to dim a pair of LEDs according to the touch wheel s position to mimic human dialing This is done by making use of the multi channel mode of CCU6 Figure 6 USB Docking Station displaying human dialing Application Note 7 V1 0 2011 02 AP08121 Infrared Remote Controller with Capacitive Touch Interface Infineon Hardware Setup and Basic Program Flow 2 4 Program Flow IR Transmitter The microcontroll
22. ill low power requirements The tool chain DAVE Bench is based on Eclipse technology and can be downloaded free of charge from http www infineon com dave bench It includes a compiler a flash loader a debugger an IDE and a real time user interface called U Spy Application Note 5 V1 0 2011 02 SC ee AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Hardware Setup and Basic Program Flow 2 Hardware Setup and Basic Program Flow 2 1 IR Transmitter XC822MT Figure2 IR Transmitter The R Transmitter is on a flexible PCB which is glued directly onto the upper part of the housing As a result the touch elements are in close contact with the cover material with minimum air gaps The infrared LED a reverse shining SMD type is mounted together with the 8 bit microcontroller XC822MT at the same flexible PCB This part is folded into the front of the housing Figure 3 IR Transmitter viewed by a camera in night vision mode Users can tap or touch and hold the two Infrared Transmitter buttons and they can tap or dial the touch wheel The infrared diode is directly controlled by the 8 bit microcontroller XC822MT which generates a 36 kHz carrier wave and modulates the bit stream to be transmitted The 3V power supply of the transmitter is realized by two AAA batteries The flexible PCB is connected to this power supply but can be removed and plugged into the USB docking station
23. ith the PC Application Note 9 V1 0 2011 02 AP08121 Infrared Remote Controller with Capacitive Touch Interface Infineon Infrared Communication 3 Infrared Communication Most audio and video players can be controlled with infrared remote controllers The infrared IR spectrum has less ambient noise than visible light which makes it very suitable for simple and reliable communication The typical setup includes an IR transmitter an IR receiver and a protocol for communication One of the most widely used protocols is the RC 5 standard from Philips The communication is one way only the transmitter sends commands to the receiver The transmitter does this by toggling the on board infrared LED TSML1000 on and off The infrared light of the LED is detected by a photo diode in the receiver IC TSOP34836 on the receiver board 3 1 The transmitter follows the RC 5 protocol and the LED is toggled on off at a frequency of 36 kHz the so called carrier frequency The carrier frequency in turn is modulated by a bit stream at a much lower frequency The bitstream itself is Manchester encoded by the transmitting microcontroller Manchester encoding or bi phase modulation means that every bit is divided into two chips 0 and 1 Bit 1 contains a 0 1 chip transition while bit 0 contains a 1 0 chip transition Manchester code ensures that there is at least one line voltage transition per bit which helps recovery The receiver IC de modulates th
24. nterface Touch Interface Figure 28 Actual calculated angle for a full round Infineon provides a function library for angle calculation The resolution explained earlier is user selectable from 1 to 8 The XC822M and XC822MT microcontrollers have a Multiplication Division Unit MDU for hardware acceleration If the MDU is used for the division necessary to calculate the angle the resolution is fixed at 8 execution is faster and the code size is about 250 bytes smaller than without hardware acceleration The disadvantage is that the MDU increases the microcontroller s current consumption by almost 1 mA Application Note 22 V1 0 2011 02 SC re AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Power Saving 5 Power Saving It is essential for battery operated devices to minimize power consumption To achieve low average current consumption the microcontroller of the IR Transmitter runs at a reduced clock speed uses a low voltage power supply and dynamically changes operating mode dependent on usage Static measures e The microcontroller runs on an 8 MHz system clock instead of 24 MHz to reduce power consumption in active mode e All unused peripherals are permanently disabled by gating off their clock inputs Only LEDTSCU T2 and CCU6 are enabled Dynamic measures e When no interrupt service routine is running the microcontroller is in idle mode In idle mode the CPU clock is
25. ons In contrast the designer of capacitive touch systems can focus on interface requirements taking advantage of the flexible and ultra flat design solutions that the technology offers and the ability to detect user input through enclosure materials adjusting behaviour simply through software parameters rather than being dependent on mechanical constraints IR Transmitter USB Docking Station IR Receiver Figure 1 IR Remote Control Kit The IR Remote Control Kit provides all the components necessary to evaluate capacitive touch techniques in infrared IR remote control solutions The kit provides all necessary components for evaluation of capacitive touch technique in infrared IR remote control solutions The remote controller is an infrared transmitter which contains two touch buttons and a touch wheel The infrared receiver board is in DIP16 form factor and can be used in many custom evaluation systems The USB docking station provides 8 signaling LEDs and a flash programming interface for both the receiver and the transmitter With the infrared receiver in the docking station the 8 LEDs act as a simple display The embedded software for both the receiver and transmitter is part of the kit Together with the signal processing of the touch sense unit the standard RC 5 protocol is implemented for infrared transmission and reception The transmitter software additionally includes a power down and wake up sequence to fulf
26. please refer to the Help menu in U SPY o gt The U SPY can be launched directly from DAVE Bench by clicking on the icon 7 2 Settings The custom configuration and user interface for a particular task or application can be saved in the format xxx ini This allows specific setting files to be shared among users For the IR Remote Controller two ini files have been configured RemoteControl_Rotation ini and RemoteControl_TouchSense amp WheelEvaluation ini Serial communication is via the full duplex UART protocol at a baudrate of 57 6 kbps Note Ensure that the USB docking station mode is switched to R Figure 33 before running any of the monitoring routines In R mode RUN the UART interface will be full duplex whereas in L mode LOAD the UART interface will be half duplex LOAD Figure 33 Switch to RUN mode on USB Docking Station 7 3 UART Interrupt Any data transmission to or from U SPY will trigger the UART interrupt in the docked microcontroller Checks are performed during the interrupt to determine whether data is to be transmitted or received The data transmit or receive process is then carried out automatically 7 4 RemoteControl_ Rotation ini This settings file Figure 34 is customized to allow the user to monitor the 14 bits RC 5 packet decoded by the receiving microcontroller as well as an interface between the IR Remote Controller hardware and softwa
27. rage The moving average filters noise and is used as a comparison platform to detect sudden changes in capacitance When a button is touched or released a corresponding pad flag in RAM refer to the Users Manual will be set or reset and the R Transmitter will transmit a button press or release command to the R Receiver which will turn on or off the corresponding LED on the USB Docking Station The pad flags for the wheel pads are unused always cleared and it is the moving averages pad averages that are used instead to calculate the angle of the touch The three pads are automatically calibrated to the same sensitivity and resolution during startup The parameters are optimized for 3V input voltage battery operated but some adjustments are automatically made if 5V input voltage is detected docked in the USB Docking Station Once the pad averages are stable an angle calculation algorithm is run if the wheel is touched If a new angle is calculated the R Transmitter will start to transmit a new angle command to the R Receiver which will show the angle on the 6 touch wheel LEDs on the USB Docking Station 4 1 Wheel Angle Calculation The three touch pads of the wheel are placed in a spatially interpolated manner 0 oS 240 120 Figure 19 Spatially interpolated wheel layout and abstraction If the pads are calibrated to roughly the same sensitivity and the wheel is dialed clockwise with constant angular spee
28. re Note This settings file is only to be used with the IR Receiver board plugged in to the USB docking station Application Note 26 V1 0 2011 02 SC re AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Monitoring joma J8 Eee RIR BAT E Control Box d lol x Display Fields Toggle Bit fi Address 27 000000 Data 48 000000 Angle 300 000000 degrees Angle Control Progress Bars _ Buttons Brightness Vol Br Channel Status Flags 50 50 37 37 l 25 25 Left_Button Right_Button LED LED4 12 13 LED6 LED3 LEDS LED2 0 1 Figure 24 RemoteControl_Rotation ini User Interface 7 4 1 Data Format A data group consisting of 8 bytes is transmitted to U SPY in the following format Table 1 Table 1 RemoteControl_ Rotation ini Transmitted Data Format DataByte0 DO D1 D2 D3 D4 D5 D6 D7 Value hex 83 XX XX XX XX XX XX XX Description LD Angle Channel Volume LEDs Toggle Bit Address Data Brightness The data group received by U SPY is then matched or masked before it is displayed Display Fields The received RC 5 packet bits Toggle bit Address and Data as described in Chapter 3 1 Protocol and the calculated Wheel Angle are displayed in the display fields Buttons The buttons are used to transmit data from U SPY to the receiver board Data is transmitted in the following format Table 2 Application Note 27 V1 0 2011 02
29. roller on the IR Receiver board T2EX is the external input of the Timer 2 72 module of XC822 T2 is a flexible 16 bit timer with some additional capabilities Since this module is capable of detecting rising or falling edges on T2EX the microcontroller can detect the rising and falling edges of the demodulated and inverted signal and measure the time passed between the edges In the RC 5 protocol the distance between edges can be 1 778ms 2 chips or 0 889 ms 1 chip The microcontroller measures these distances with a nominal resolution of 0 042 us If the measured distance is not 1 or 2 chips the received edge is deemed noise and the microcontroller will wait for a new packet A tolerance of about 15 is allowed to be robust against ambient noise and to accommodate internal oscillator imperfections Detecting the edges and knowing the distance between them is enough to decode a Manchester encoded signal The first bit is always 1 so the first edge is always a falling edge Every falling edge is followed by a rising edge and every rising edge is followed by a falling edge Whenever an edge is detected T2 generates a capture event interrupt where the received signal is evaluated If no edge is detected T2 overflows and re initializes every 2 73 ms Application Note 13 V1 0 2011 02 Infineon interface Infrared Remote Controller with Capacitive Touch Interface Infrared Communication y E CR e a edge is detected
30. s is controlled by the duty cycle of a 500Hz PWM signal generated by T12 in the CCU6 module At any given moment a maximum of 2 LEDs are on with dimmed brightness to indicate the position of the finger For example at 45 LED4 and LED3 are on LED4 has 75 brightness and LED3 has 25 brightness The LEDs are enabled and disabled by CCU6 multi channel mode MCM The LEDs are updated every 5 ms in the 773PM interrupt 09 LED1 LED4 COUT61 CC60 459 sector sector sector LED6 sector sector sector LED8 LED2 COUT60 CC61 180 COUT62 L ee Figure 17 Touch Wheel LEDs on the USB Docking Station Alternative modes s f the user connects to the USB Docking Station the behavior of the LEDs can be changed from the PC via U SPY see chapter 6 so that the all LEDs are turned on and their brightness is adjusted by dialing e During calibration the 6 LEDs blink in an alternating triangle pattern This overrides the function in which they indicate angle Application Note 15 V1 0 2011 02 Infineon AP08121 Infrared Remote Controller with Capacitive Touch Interface Infrared Communication T13PM CC6 C every 5 ms new angle received Y set target_angle for the LED display N timeout aa slowly move displayed angle towards target update display_angle Y find which section o
31. stopped s lf the IR Transmitter is unused for more than 10 s the microcontroller enters power down mode 2 and wakes up every 300 ms for a short time to check for user activity In power down mode 2 the main embedded voltage regulator is switched off only the low power embedded voltage regulator keeps operating The flash memory and the main oscillator are put in power down mode too The onboard 75 kHz oscillator and the Real Time Clock module remain active and generate a periodic wakeup signal every 300 ms If there is no user activity on the touch buttons or the touch wheel the microcontroller goes back to power down mode in 1 8 ms after waking up e CCU6 is turned off before the microcontroller enters power down mode to reduce power consumption during the periodic wakeups It is turned back on if the wheel or the buttons have been touched l wheel button wheel button has been idle wheel button wheel button IN A touched released for over 10s touched released ee 4 WW turn off CCU6 9mA DEN continuous SCH transmission N poweredup average current powered up periodic start transmission CPU mostly idle CPU mostly idle wakeup 5mA Ke successful wakeup turn on CCU6 5uA gt t 1 5 me 300 ma Figure 29 Average current consumption in different operating modes Application Note 23 V1 0 2011 02 SC ee AP08121 infi neon Infrared Remote Controller with Capacitive Touch Inter
32. ut turn off LEDs of 6 the displayed angle is in Vv activate the 2 LEDs of the section Y set the dimming level of the 2 LEDs according to the displayed angle i calibrating Y d override LEDs 3 alternating LEDs N blink slowly with maximum brightness update MCM register and initiate shadow transfers LEDs are actually updated Figure 18 Angle display on the wheel LEDs Application Note 16 V1 0 2011 02 ee AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Touch Interface 4 Touch Interface The R Transmitter has five touch pads two are used as touch buttons and the remaining three form a wheel for dialing All 5 pads are handled by the XC822MT microcontrollers LED Touch Sense Control Unit LEDTSCU which is a dedicated touch sense controller module The main touch sensing functions handled by software are e Sample accumulation ROM library e Signal filtering and moving average generation ROM library e Touch detection ROM library e Touch wheel calibration user software in Flash e Signal tuning user software in Flash If properly configured the LEDTSCU automatically measures the capacitance of the five pads This capacitance increases when a button is touched A library function in ROM processes the capacitance signals and detects touches on the two buttons It does so by accumulating 3 samples and low pass filtering them to create a moving ave
33. vec RI L D Ka N bina R T n LED2 TSML1000 PO 0 T2 T13HR T12HRIMTSR MRST CCPO PO 1 T0 CCB1 T13HR MT SRM 14 16 SMARTCASE M PO 4 T2EX SCL SCK EXINT 1 CTRAP EXF 2 COLA CO PO S EXINTO RXD TXD MTSRMRST C P0 6 SPD EXINT O RXD TXD T 2EX SDAMTSRMRST COLAICOL2 TSING AL P1 0 SPD EXINTORXD T XD T 2EX COUT 60 COLO II AQHRIT 13HR T 2EX T2 P1 2 EXINT4 COUT6 1 COUTB3 COL2 1 RXDMTSR TO S2 T 12HR T 13HR SCK T1 OSO CTRAPH T2 TP_P1 2 o e TP_GND 1 KES 7 ad ae PS GND TB 1 4 MBC gt x1 5 2010 52 Remote Control Wheel 22 02 2011 20 15 37 Wheel 2 Buttons ADJ_1 ADJ_2 ADJ_3 Figure 36 IR Transmitter Schematics ij D S ER be NTs She ope db Of Figure 37 IR Transmitter Layout single layer flexible PCB and Components Application Note 31 V1 0 2011 02 Infineon AP08121 Infrared Remote Controller with Capacitive Touch Interface Schematics and Layout 0000 0000 O O Figure 38 Battery Connector for IR Transmitter Application Note JP201 GN JP202 vc 32 V1 0 2011 02 SC ee AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Schematics and Layout
34. with Capacitive Touch Interface Touch Interface angle 0 120 240 360 untouched_a X A B 2 C Z B C 2 A S Y A C 2 B Figure 23 Combined pad average signals The resulting X Y and Z signals still have three distinct sections between 0 and 360 Section 1 0 to 120 Section 1 before the transformation has three signals between UT and UT MAXT UT stands for the untouched level and UT MAXT stands for the signal level when the largest area of the respective pad is touched this happens at 0 120 and 240 A B C A UT UT MAXT Figure 24 Section 1 before transformation After the transformation the X Y Z signals have much lower values The angle axis has been arbitrarily scaled from 1 to 2 in this region for convenience Application Note 19 V1 0 2011 02 SC re AP08121 infi neon Infrared Remote Controller with Capacitive Touch Interface Touch Interface X Y Z A MAXT Z 0 Y MAXT 2 o st 0 141 2 Figure 25 Section 1 after transformation Signal X see Figure 25 is constant low in this section so it does not participate in the angle calculation The other two signals can be described as 1 C MAXT 2 tL ER MAXT MAXT 2 2 Y l If we rearrange I we get which we can substitute in Il p 0 Y Z I 9 p oY L Z lt F Y Ill Y Z p l z IV ak Y Z One division is needed to calculate
Download Pdf Manuals
Related Search
Related Contents
Analysis Sony XM-475GSX Car Audio Amplifier warning - ZODIAC® CANADA PDF - 5 MB Copyright © All rights reserved.
Failed to retrieve file