| Electronic Components Datasheet Search |
|
PM9904BPD Datasheet(PDF) 7 Page - Sames |
|
|
|||||||||||||||||||||||||||||
PM9904BPD Datasheet(HTML) 7 Page - Sames |
|
7 / 22 page ![]() 7/22 http://www.sames.co.za sames sames PM9904BPD 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. The program flow is presented in Figure 9. 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. Rate LEDs / opto-outputs The 10ms pulse widths on these outputs are derived from the basic timer tick. 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 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. Memory Usage ROM: 4070 words or 50% of the total capacity RAM: Bank 86% 0 Bank 26% 1 Bank 83% 2 Bank --- or 50% of the total capacity 3 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. Figure 9: Program flow START /* Switch Power on */ Setup Ctrler’s ports and interrupts init() boot_scrn() interrupt service routine: 10ms ticks ctrl fast & slow tasks ctrl pulsing of rate LEDs Manage interrupt on key- press isr() Read energy registers process_a_data() process_r_data() /*Power off*/ END Read voltage and frequency registers. User Interface Displays the start-up screens on LCD |
|
|
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 |
| 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 |