Hello everyone,
IAR Embedded Workbench for MSP, MCU - MSP430F6779
I am currently working on this project.
I ma not using the kit provided by TI, instead our hardware department have made a pseudo copy of the schematic with the only components we need. For example we don have/use display on our board. So I am struggling to understand the project code with partial success. Here are some of the things I must understand:
What readings.active_power stands for (As far as I understand it holds the active power in W/100 (10mW)resolution sampled each second?)
Another thing that I don't understand is the following code that resides at emeter-background.c:
if ((phase->active_power_counter += phase->readings.active_power) >= PHASE_ENERGY_PULSE_THRESHOLD) { phase->active_power_counter -= PHASE_ENERGY_PULSE_THRESHOLD; ++phase->consumed_active_energy;
How many times consumed_active_energy will be incremented per kW/h? I evaluated PHASE_ENERGY_PULSE_THRESHOLD = 912 600 000. So when readings.active_power become greater than 912600000 consumed_active_energy will increment by 1.
Please help me to understand what human readable information hold the above variables. By human readable I mean W, kW, mW etc.
Any help would be much appreciated. Excuse my bad English.
What