Electronic Components Datasheet Search
  English  ▼

X  

AN2512 Datasheet(PDF) 30 Page - STMicroelectronics

Part # AN2512
Description  This application note describes how to design
PDF  38 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2512 Datasheet(HTML) 30 Page - STMicroelectronics

Back Button AN2512 Datasheet HTML 26Page - STMicroelectronics AN2512 Datasheet HTML 27Page - STMicroelectronics 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 Next Button
Zoom Inzoom in Zoom Outzoom out
 30 / 38 page
background image
Example of source code
AN2512
30/38
long int frac[4];
/* fraction part of energy integrator */
long int integ[4];
/* integer part of energy integrator */
} ENERG;
/* definition of variables for internal registers values */
char status[3];
char mode[3];
int freq[3];
int uRMS[3];
int iRMS[3];
int uMOM[3];
int iMOM[3];
long int active0[4];
long int active1[4];
long int reactive[4];
long int apparent[4];
/* allocation for all types of energies */
long int new;
/* energy value to be handled */
ENERG *e;
/* -> energy integrator */
ENERG ActWB;
/* Active wide band energy */
ENERG Reactive;
/* Reactive energy */
ENERG ActFund;
/* Active fundamental energy */
ENERG Apparent;
/* Apparent energy */
/* definition of constant */
#define ELIMIT 0x140000 /* produces 0.01 kWh resolution in case of 128000 pulses per
kWh */
/*----------------------------------------------------------------------------------
ROUTINE NAME : EnergyQuant
INPUT/OUTPUT : None/None
DESCRIPTION
: Energy quant computing function (version for signed
energy
integration). Checks for rollovers and compute quant as difference between new and
old value. Returns a negative sign of quant.
----------------------------------------------------------------------------------*/
int EnergyQuant(Long int *new)
{
long int NewTemp;
char i,Temp;



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


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
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