Electronic Components Datasheet Search
  English  ▼

Delete All
ON OFF
ALLDATASHEET.COM

X  

Preview PDF Download HTML

PM9904BPD Datasheet(PDF) 4 Page - Sames

Part No. PM9904BPD
Description  Evaluation Board for the SA9904B Energy Metering IC
Download  22 Pages
Scroll/Zoom Zoom In 100% Zoom Out
Maker  SAMES [Sames]
Homepage  http://www.sames.co.za
Logo 

PM9904BPD Datasheet(HTML) 4 Page - Sames

 
Zoom Inzoom in Zoom Outzoom out
 4 / 22 page
background image
sames
sames
PM9904BPD
4/22
PM9904BPD EVALUATION SOFTWARE
Software for the SA9904AP module is supplied on one 3.5”
1.44MB floppy disk and is designed to communicate with the
SA9904AP module via the PC’s parallel port. The supplied
software is written for DOS. Additional Windows software will
be posted to the SAMES web site for downloading when
available. The source code, written in Turbo C, is also
included.
File description
The following files are included on the floppy disk:
9904mtr.c
This file contains the source for the functions that read the
SA9904 registers, store these values in integration registers,
check for any overflow and generate the corresponding
energy pulse for the PM9904BPD on-board LED’s. It makes
provision to measure unbalanced energy per phase or sum the
energy for each phase. The software does not make use of
timers and relies on counting the software loops to generate
reasonable delays for the LED outputs.
pc_spi.c
This file contains the source for all the SPI interface routines
which are used to communicate between the PM9904BPD
module and th e PC’s parallel port.
pc_lcd.c
This file contains the source for all the functions relating to the
SA8807 LCD driver IC, as well as other functions to switch on
the LCD display icons.
9904mtr.exe
This is the executable file.
Running the software
The program is executed by running the 9904mtr.exe file with
the following arguments:
9904mtr.exe 1 10
The first parameter specifies the LPT port address to use
where 1= 0x378 (LPT1) and 2 = 0x278 (LPT2).
The second parameter is a loop delay. Larger values will slow
down the SPI communication speed to the PM9904BPD
module.
Read Active Register
Subtract previous value
Add to active energy integrator
Generate pulse
If integrator > threshold
Subtract threshold from integrator
Load creep timer
Wait for next measurement cycle
Do other functions on the meter
Yes
No
Check and fix register value wrapping
Read Active Register
Subtract previous value
Add to active energy integrator
Generate pulse
If integrator > threshold
Subtract threshold from integrator
Load creep timer
Wait for next measurement cycle
Do other functions on the meter
Yes
No
Check and fix register value wrapping
Figure 4: Pulse flow diagram
Getting the SA9904 to generate pulses proportional
to the energy measured.
Figure 4 is a flow diagram showing how to generate pulses
proportional to energy measured by the SA9904A. The speed
of execution is not critical, although it will influence the
resolution of the pulses that is generated.
It is recommended that the flow diagram be implemented
together with a timer interrupt used for the creep timing. The
same flow diagram is applicable for the SA9604A, but reading
of the register values should be synchronized with changes in
bit D19 of its frequency register.
http://www.sames.co.za
Threshold and pulse rates
The active and reactive registers on the SA9904B increment at
a rate of 320 000 counts per second at rated metering
conditions for a sine wave. A single count of the active register
corresponds to an amount of energy expressed in Watt
seconds (Ws).
Energy per count is (Ws):
Epc = Vnom x Imax / 320 000


Html Pages

1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22 


Datasheet Download




Link URL




Privacy Policy
ALLDATASHEET.COM
Does ALLDATASHEET help your business so far?  [ DONATE ]  

About Alldatasheet   |   Advertisement   |   Datasheet Upload   |   Contact us   |   Privacy Policy   |   Alldatasheet API   |   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