|
Electronic Load
1.0
Programmable Constant Current Sink
|
Structures and Constants for Configuration Handling. More...


Go to the source code of this file.
Data Structures | |
| struct | confStruct_t |
| Holds all Configuration Data stored in EEPROM. More... | |
| struct | soa_t |
| struct | volatileConfStruct_t |
| These values will be calculated by ReadConfig() and/or on-the-fly by measurement. More... | |
Macros | |
| #define | CONF_MAGIC 0x0151 |
| Increment this value if confStruct_t becomes incompatible to previous versions! More... | |
| #define | PRESET0 0.0 |
| #define | PRESET1 0.001 |
| #define | PRESET2 0.0015 |
| #define | PRESET3 0.005 |
| #define | PRESET4 0.01 |
| #define | PRESET5 0.05 |
| #define | PRESET6 0.1 |
| #define | PRESET7 0.5 |
| #define | PRESET8 1.0 |
| #define | PRESET9 4.0 |
| #define | R12 8200.0 |
| High side Resistor to the 2.5V Reference Voltage. More... | |
| #define | R13 2200.0 |
| Low side Resistor to the 2.5V Reference Voltage. More... | |
| #define | R16 120000.0 |
| High Side Voltage Divider Resistor. More... | |
| #define | R18 1000.0 |
| Low Side Voltage Divider Resistor. More... | |
| #define | R23 0.1 |
| High Range Shunt Resistor. More... | |
| #define | R25 3.3 |
| Low Range Shunt Resistor. More... | |
| #define | SOA_I2 3.2 |
| The Current at the upper Margin of const Pv. More... | |
| #define | SOA_I3 0.35 |
| The allowable Current at 60V. More... | |
| #define | SOA_IMAX 4.0 |
| The absolute maximum Current. More... | |
| #define | SOA_PMAX 80.0 |
| The maximum allowable Power Dissipation. More... | |
| #define | SOA_V2 25.0 |
| The Voltage at the upper Margin of const Pv. More... | |
| #define | SPIADCVOLTSPERLSB (SPIVREF/65536) |
| Native ADC Voltage per LSB. More... | |
| #define | SPIDIFFVOLTSPERLSB (SPIADCVOLTSPERLSB/R18*(R16+R18)) |
| Volts per LSB for the differential Voltage Sensor. More... | |
| #define | SPIHIGHAMPSPERLSB (SPIADCVOLTSPERLSB/R23) |
| Amperes per LSB in High Current Range. More... | |
| #define | SPILOWAMPSPERLSB (SPIADCVOLTSPERLSB/R25) |
| Amperes per LSB in Low Current Range. More... | |
| #define | SPIVREF (2.5/(R12+R13)*R13) |
| Reference voltage for the SPI ADC. More... | |
| #define | TEMP_MAX 80 |
| Maximum sink temperature before Eload switches off. More... | |
Functions | |
| void | DumpConfig (void) |
| Lists the current configuration values. More... | |
| void | DumpConfigSignal (uint8_t number) |
| void | ReadConfig (void) |
| Reads the Config-Struct from EEPROM into config. More... | |
| double | SOAGetImax (double v) |
| Calculate maximum allowable Current at a given Voltage. More... | |
| void | WriteConfig (void) |
| Writes the Config-Struct to EEPROM. More... | |
Variables | |
| confStruct_t | config |
| The Configuration. It is read on startup from the EEPROM. More... | |
| bool | configDirty |
| Set to true by routines affecting configuration if config memory needs to be saved to the EEPROM. More... | |
| volatileConfStruct_t | volatileConfig |
| Configuration Values that can be calculated. More... | |
Structures and Constants for Configuration Handling.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
| #define CONF_MAGIC 0x0151 |
Increment this value if confStruct_t becomes incompatible to previous versions!
| #define R12 8200.0 |
High side Resistor to the 2.5V Reference Voltage.
| #define R13 2200.0 |
Low side Resistor to the 2.5V Reference Voltage.
| #define R16 120000.0 |
High Side Voltage Divider Resistor.
| #define R18 1000.0 |
Low Side Voltage Divider Resistor.
| #define R23 0.1 |
High Range Shunt Resistor.
| #define R25 3.3 |
Low Range Shunt Resistor.
| #define SPIADCVOLTSPERLSB (SPIVREF/65536) |
Native ADC Voltage per LSB.
| #define SPIDIFFVOLTSPERLSB (SPIADCVOLTSPERLSB/R18*(R16+R18)) |
Volts per LSB for the differential Voltage Sensor.
| #define SPIHIGHAMPSPERLSB (SPIADCVOLTSPERLSB/R23) |
Amperes per LSB in High Current Range.
| #define SPILOWAMPSPERLSB (SPIADCVOLTSPERLSB/R25) |
Amperes per LSB in Low Current Range.
| #define PRESET0 0.0 |
| #define PRESET1 0.001 |
| #define PRESET2 0.0015 |
| #define PRESET3 0.005 |
| #define PRESET4 0.01 |
| #define PRESET5 0.05 |
| #define PRESET6 0.1 |
| #define PRESET7 0.5 |
| #define PRESET8 1.0 |
| #define PRESET9 4.0 |
| #define SOA_PMAX 80.0 |
The maximum allowable Power Dissipation.
| #define SOA_V2 25.0 |
The Voltage at the upper Margin of const Pv.
| #define SOA_IMAX 4.0 |
The absolute maximum Current.
| #define SOA_I2 3.2 |
The Current at the upper Margin of const Pv.
| #define SOA_I3 0.35 |
The allowable Current at 60V.
| #define TEMP_MAX 80 |
Maximum sink temperature before Eload switches off.
| void ReadConfig | ( | void | ) |
Reads the Config-Struct from EEPROM into config.
Only the config-struct in RAM will be used. Changes in config will only become permanent if you use a write-command. There is a configDirty-flag that is set by every routine that changes config and is used to remind the user to execute a write-command.

| void WriteConfig | ( | void | ) |
Writes the Config-Struct to EEPROM.

| void DumpConfigSignal | ( | uint8_t | number | ) |
| void DumpConfig | ( | void | ) |
Lists the current configuration values.
Prints a verbose explanation of the configuration data to the host. This function relies on hprintf_P() which does the work and knows where the host is...

| double SOAGetImax | ( | double | v | ) |
Calculate maximum allowable Current at a given Voltage.
| v | The Voltage currently applied |
| bool configDirty |
Set to true by routines affecting configuration if config memory needs to be saved to the EEPROM.
| confStruct_t config |
The Configuration. It is read on startup from the EEPROM.
| volatileConfStruct_t volatileConfig |
Configuration Values that can be calculated.
1.8.15