| поискавой системы для электроныых деталей |
|
AN4099 датащи(PDF) 24 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4099 датащи(HTML) 24 Page - STMicroelectronics |
|
24 / 39 page ![]() Infrared receiver AN4099 24/39 Doc ID 023110 Rev 2 } RC5_Frame_TypeDef ; IR_RC5_decode () is executed when the RC5FrameReceived flag is equal to YES. RC5_DeInit() This function de-initializes the different peripherals (GPIO, TIMER...). TIM2_IRQHandler () This function handles the TIM Capture Compare interrupt. – Timer Falling Edge Event: this is used to measure the period between two successive falling edges (the entire pulse duration). – Timer Rising Edge Event: this is used to measure the duration between falling and rising edges (the low pulse duration). – Update event (time-out event): this resets the RC5 packet. The Timer Overflow is set to 3.7 ms. The low pulse duration and the whole pulse duration are used to determine the bit value. Each bit value is determined in relation to the last bit. 3.3.3 How to use the RC5 decoder driver To use the RC5 decoder driver, proceed as follows. – Call the function RC5_Init() to configure the timer and GPIO hardware resources needed for RC5 decoding. – TIM2 Capture Compare and Update interrupts are used to decode the RC5 frame, if a frame is received correctly a global variable "RC5FrameReceived" is set to inform the application. – The application should then call the function RC5_Decode() to retrieve the received RC5 frame. Code example #include "rc5_decode.h" /* IR_FRAME will hold the RC5 frame (Address, Command,...) */ RC5_Frame_TypeDef IR_FRAME; /* Initialize the RC5 driver */ RC5_Init(); while(1) { /* Decode the received RC5 frame and store it in IR_FRAME variable */ RC5_Decode(&IR_FRAME); /* Here add the code that will process the just received frame, i.e. IR_FRAME variable, otherwise it will be overwritten by the next frame */ ... |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |