công cụ tìm kiếm bảng dữ liệu linh kiện điện tử
  Vietnamese  ▼
ALLDATASHEET.VN

X  

AN2512 bảng dữ liệu(PDF) 32 Page - STMicroelectronics

tên linh kiện AN2512
Giải thích chi tiết về linh kiện  This application note describes how to design
PDF  38 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
nhà sản xuất  STMICROELECTRONICS [STMicroelectronics]
Trang chủ  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2512 bảng dữ liệu(HTML) 32 Page - STMicroelectronics

Back Button AN2512 Datasheet HTML 28Page - STMicroelectronics AN2512 Datasheet HTML 29Page - STMicroelectronics AN2512 Datasheet HTML 30Page - STMicroelectronics AN2512 Datasheet HTML 31Page - STMicroelectronics AN2512 Datasheet HTML 32Page - STMicroelectronics AN2512 Datasheet HTML 33Page - STMicroelectronics AN2512 Datasheet HTML 34Page - STMicroelectronics AN2512 Datasheet HTML 35Page - STMicroelectronics AN2512 Datasheet HTML 36Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 32 / 38 page
background image
Example of source code
AN2512
32/38
if (e->quant[3] > 0xf0000000) //for test purpose
e->quant[3] = 0;
e->quot[3] = e->quant[3] >> 4;
Temp = e->quant[3] & 0x0f;//save the residue
e->frac[3] += Temp;
Accuracy_Error_Count ++;
if (Accuracy_Error_Count == 3){
Accuracy_Error_Count = 0;
if (e->quant[0] >= 2)
e->quant[0] -= 2;
}
led_frac += e->quant[0] & 0x0f;
e->quot[2] = e->quot[1];
e->quot[1] = e->quot[0];
e->quot[0] = e->quant[0] >> 4;
}
/*--------------------------------------------------------------------------------
ROUTINE NAME : EnergyUpdate
INPUT/OUTPUT : None/None
DESCRIPTION
: Energy update function (version for signed energy integration)If quant
is negative, subtract otherwise add its value from the integrator. Returns true when
frac reaches ELIMIT
---------------------------------------------------------------------------------*/
int EnergyUpdate(void)
{
PM_u8 i;
e = &ActWB;
// active WB energy calculation
for (i = 0; i < 3; i++){
e->frac[i] += (Long int)e->quot[i];// add quot to frac
if (e->quant[i] < 0){
// is quant negative?
if (e->frac[i] > (-ELIMIT))
return(0);
// yes, is within the limit?
else {
e->frac[i] += ELIMIT;
(e->integ[i])--;
// no, subtract it and increment



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


bảng dữ liệu tải về

Go To PDF Page


Link URL



Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không?  [ DONATE ] 

Alldatasheet là   |   Quảng cáo   |   Liên lạc với chúng tôi   |   Chính sách bảo mật   |   Liên kết đến bảng dữ liệu    |   Trao đổi link   |   Tìm kiếm theo nhà sản xuất
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