전자부품 데이터시트 검색엔진
  Korean  ▼
ALLDATASHEET.CO.KR

X  

AN2841 데이터시트(PDF) 11 Page - STMicroelectronics

부품명 AN2841
상세설명  This application note deals with the general principles of LED dimming
PDF  31 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
제조업체  STMICROELECTRONICS [STMicroelectronics]
홈페이지  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2841 데이터시트(HTML) 11 Page - STMicroelectronics

Back Button AN2841 Datasheet HTML 7Page - STMicroelectronics AN2841 Datasheet HTML 8Page - STMicroelectronics AN2841 Datasheet HTML 9Page - STMicroelectronics AN2841 Datasheet HTML 10Page - STMicroelectronics AN2841 Datasheet HTML 11Page - STMicroelectronics AN2841 Datasheet HTML 12Page - STMicroelectronics AN2841 Datasheet HTML 13Page - STMicroelectronics AN2841 Datasheet HTML 14Page - STMicroelectronics AN2841 Datasheet HTML 15Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 11 / 31 page
background image
AN2841
Dimming application using an STM32 microcontroller
11/31
Figure 8.
Conversion of
LEDmap array to LEDdriverDATAbuffer
Example using a 4×8 LED matrix with an 8-bit PWM resolution
while(1)
for(depth = 1; depth<=0xff; depth++){
for(DATAchar = 0; DATAchar < 4; DATAchar++){
for(outputBIT = 0; outputBIT < 8; outputBIT++){
LEDdriverDATAbuffer[DATAchar] <<= 1;
if(LEDmap[(DATAchar*8) + outputBIT] > depth)
LEDdriverDATAbuffer[DATAchar] |= 0x0001;
else
LEDdriverDATAbuffer[DATAchar] &= 0xFFFE;
}
SPI_SendData(SPI1, LEDdriverDATAbuffer[DATAchar]);
}
LE_LOW();
LE_HIGH();
LE_LOW();
}
Even though the dynamic data preparation consumes a minimum of system memory, it
takes a lot of computational time. This approach is only recommended for low LED count
applications. A dynamic data preparation approach can reach 100 Hz for 32 LEDs (with
maximum code optimization in C compiler on the STM32 evaluation board).
LEDmap[0] > depth =
0
LEDmap[1] > depth =
1
LEDmap[2] > depth =
1
LEDmap[3] > depth =
0
LEDmap[4] > depth =
1
LEDmap[6] > depth =
1
LEDmap[7] > depth =
0
LEDmap[8] > depth =
0
for one time stamp depth = 50
LEDmap= { 20, 60, 75, 22, 100, 255, 0, 5}
LEDdriverDATAbuffer[0]
LED driver
for outputBIT from 0 to 7
SPI
AM00347



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


데이터시트 다운로드

Go To PDF Page


링크 URL



ALLDATASHEET 가 귀하에 도움이 되셨나요?  [ DONATE ] 

Alldatasheet는?   |   광고문의   |   운영자에게 연락하기   |   개인정보취급방침   |   링크 투 데이터시트    |   링크교환   |   제조사별 검색
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