поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

AN4099 датащи(PDF) 33 Page - STMicroelectronics

номер детали AN4099
подробное описание детали  Implementing transmitters and receivers for infrared remote control protocols using STM32F0xx and STM32F3xx microcontrollers
PDF  39 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4099 датащи(HTML) 33 Page - STMicroelectronics

Back Button AN4099 Datasheet HTML 29Page - STMicroelectronics AN4099 Datasheet HTML 30Page - STMicroelectronics AN4099 Datasheet HTML 31Page - STMicroelectronics AN4099 Datasheet HTML 32Page - STMicroelectronics AN4099 Datasheet HTML 33Page - STMicroelectronics AN4099 Datasheet HTML 34Page - STMicroelectronics AN4099 Datasheet HTML 35Page - STMicroelectronics AN4099 Datasheet HTML 36Page - STMicroelectronics AN4099 Datasheet HTML 37Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 33 / 39 page
background image
AN4099
Interface layer
Doc ID 023110 Rev 2
33/39
4.2
How to customize the IR drivers
4.2.1
IR receiver drivers
To include an infrared decoder driver based on the PWM input solution in a user application,
you must:
1.
Add the header file of the appropriate IR protocol to your project.
Example: rc5_decode.h.
2.
Add the file.c corresponding to the IR protocol to your project.
Example: rc5_decode.c.
3.
Call the function of protocol initiation in the main()
Example: RC5_Init();
4.
Add the TIMx interrupt functions to stm32f0xx_it.c or stm32f3xx_it.c.
Example:
void TIM2_IRQHandler (void)
{
static uint32_t ICValue1;
static uint32_t ICValue2;
/* IC1 Interrupt*/
if((TIM_GetFlagStatus(IR_TIM, TIM_FLAG_CC1) != RESET))
{
TIM_ClearFlag(IR_TIM, TIM_FLAG_CC1);
/* Get the Input Capture value */
ICValue2 = TIM_GetCapture1(IR_TIM);
/* RC5 */
RC5_DataSampling(ICValue2 - ICValue1, 0);
}
/* IC2 Interrupt */
else if((TIM_GetFlagStatus(IR_TIM, TIM_FLAG_CC2) != RESET))
{
TIM_ClearFlag(IR_TIM, TIM_FLAG_CC2);
/* Get the Input Capture value */
ICValue1 = TIM_GetCapture2(IR_TIM);
RC5_DataSampling(ICValue1 , 1);
}
/* Checks whether the IR_TIM flag is set or not.*/
else if ((TIM_GetFlagStatus(IR_TIM, TIM_FLAG_Update) != RESET))
{
/* Clears the IR_TIM's pending flags*/
TIM_ClearFlag(IR_TIM, TIM_FLAG_Update);
RC5_ResetPacket();
}
}



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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