| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
AN2512 bảng dữ liệu(PDF) 32 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2512 bảng dữ liệu(HTML) 32 Page - STMicroelectronics |
|
32 / 38 page ![]() 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 |
|
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 |
| 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 |