欢迎访问ic37.com |
会员登录 免费注册
发布采购

PM9904BPD 参数 Datasheet PDF下载

PM9904BPD图片预览
型号: PM9904BPD
PDF下载: 下载PDF文件 查看货源
内容描述: 评估板为SA9904B电能计量IC [Evaluation Board for the SA9904B Energy Metering IC]
分类和应用:
文件页数/大小: 22 页 / 4347 K
品牌: SAMES [ SAMES ]
 浏览型号PM9904BPD的Datasheet PDF文件第3页浏览型号PM9904BPD的Datasheet PDF文件第4页浏览型号PM9904BPD的Datasheet PDF文件第5页浏览型号PM9904BPD的Datasheet PDF文件第6页浏览型号PM9904BPD的Datasheet PDF文件第8页浏览型号PM9904BPD的Datasheet PDF文件第9页浏览型号PM9904BPD的Datasheet PDF文件第10页浏览型号PM9904BPD的Datasheet PDF文件第11页  
PM9904BPD  
ssaammeess  
Firmware  
The micro-controller’s code was created according to the  
guidelines set out in the evaluation software section. It is  
presented as a kick-start to experimentation with the micro-  
controller module and as such shouldn’t be seen as the best  
(or only) possible implementation. The code was generated  
using Hi-Tech PIC C (v7.86PL4); the demo version on their  
www site (www.htsoft.com) is sufficient for experimentation.  
Theprogramflow ispresentedinFigure9.  
method of deciding what the predefined value should be is to  
measure the time between two pulses at the lowest  
permissible load current, this is then expressed i.t.o basic  
timer ticks.  
User Interface  
A simple interface has been implemented using two of the  
three available keys. The Enter Key toggles display of  
consumed kWh and kVARh units. The Down Key displays per  
phase voltage and frequency data, each press shows the next  
phase’s data.  
SPI  
Bit-banging SPI is used to aid portability to other micros, i.e.  
three port pins under direct software control creates  
SPI_CLOCK, MOSI and reads MISO. The SPI access of the  
SA9904B is divided into two tasks namely, fast and slow  
changing data. This is accomplished via an interrupt driven  
time-slicing architecture, with a basic timer tick of 10ms.  
Memory Usage  
ROM:  
4070 words  
or 50% of the total capacity  
RAM:  
Rate LEDs / opto-outputs  
The 10ms pulse widths on these outputs are derived from the  
basic timer tick.  
Bank0 86%  
Bank1 26%  
Bank2 83%  
Bank3 ---  
or 50% of the total capacity  
Creep  
The creep algorithm is simply: - if the time between two  
successive pulses is greater than a predefined maximum, the  
respective energy accumulator is cleared. The simplest  
Please refer to the readme. 1st file for any updated information  
not contained in this application note. The mentioned file is  
part of the source code that accompanies this module.  
/* Switch Power on */  
START  
init()  
Setup Ctrler’s ports and interrupts  
Displays the start-up screens on LCD  
boot_scrn()  
Read voltage and  
frequency registers.  
Read energy  
registers  
User Interface  
isr()  
interrupt service routine:  
10ms ticks  
ctrl fast & slow tasks  
ctrl pulsing of rate LEDs  
Manage interrupt on key-  
press  
process_a_data()  
process_r_data()  
END  
/*Power off*/  
Figure 9: Program flow  
http://www.sames.co.za  
7/22  
 复制成功!