Electronic Load 1.0 Programmable Constant Current Sink

Macros | Typedefs | Functions | Variables
Eload.h File Reference
Include dependency graph for Eload.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | ADC_MAX_CHANNEL 7
| Last internal ADC-Channal used. More...
#define | ADC_MIN_CHANNEL 4
| First internal ADC-Channel used. More...
#define | ADCVoltsPerLSB (2.56/1024)
| Voltage step for one LSB of the AD converter. More...
#define | dividerP12 (4.7/(4.7+68))
| Resistor divider for Unreg. Gives 39.6V FSR or 38.7mV/LSB. More...
#define | dividerP5 (4.7/(4.7+22))
| Resistor divider for P5. Gives 7.03V FSR or 6.86mV/LSB. More...

## Typedefs
typedef uint8_t | delay_t

## Functions
void | DoFlags ()
| Process Communication-, Time- and Key-Flags. More...
void | Ticks2HMS (uint32_t ticks, char *str, size_t n)

## Variables
static const uint8_t | DFLAG_ADC =1
| Gives information about voltage and current measurements. More...
static const uint8_t | DFLAG_AH =4
| Gives information about Ah and Wh calculations. More...
static const uint8_t | DFLAG_RCHAN =8
| Gives information about channel resistance computation. More...
static const uint8_t | DFLAG_SENSOR =2
| Gives information about sensors and on chip ADC. More...
volatile uint8_t | dFlags
| Flags Controlling Debug Output. More...
static const uint8_t | EFLAG_AVG_LOST =64
| New Averages were ready but the New Averages Flag was still set. More...
PGM_P const | eflag_descr [] ={ eflag1,eflag2,eflag3,eflag4,eflag5,eflag6,eflag7 }
| Array of strings containing a description for each flag. More...
static const uint8_t | EFLAG_NTC1 =1
| NTC1 (the onboard one) seems non-functional. More...
static const uint8_t | EFLAG_NTC2 =2
| NTC2 (the NTC on the Heat Sink) seems non-functional. More...
static const uint8_t | EFLAG_P12 =8
| +12V Supply out of tolerance More...
static const uint8_t | EFLAG_P5 =4
| +5V Supply out of tolerance More...
static const uint8_t | EFLAG_SOA =16
| Indicates Limits caused by the SOA of the Transistor. Should be somehow displayed! More...
static const uint8_t | EFLAG_TEMP =32
| Heat Sink Overtemp. More...
volatile uint8_t | eflags
| Error Flags. More...
volatile uint8_t | hrCnt
| Hours of the RTC. More...
uint8_t | mcusrMirror
| Copy of the MCUSR taken shortly after reset. More...
volatile uint8_t | minCnt
| Minutes of the RTC. More...
volatile uint8_t | secCnt
| Seconds of the RTC. More...
static const uint8_t | SFLAG_REFRESH =1
| Is set three times per Second when Refresh-Items should be handled. More...
volatile uint8_t | sFlags
| Flags used for Screen Control. More...
static const uint8_t | TFLAG_DAY =8
| Is set every Day at Midnight. More...
static const uint8_t | TFLAG_HOUR =4
| Is set once per Hour at Minute 0. More...
static const uint8_t | TFLAG_MIN =2
| Is set once per Minute at Second 0. More...
static const uint8_t | TFLAG_SEC =1
| Is set once per Second. More...
volatile uint8_t | tFlags
| Flags set by Timer Interrupt to signal Main Loop. More...
volatile uint8_t | tickCnt
| Counter for timer0 interrupts. More...

## Macro Definition Documentation

## ◆ ADC_MIN_CHANNEL

#define ADC_MIN_CHANNEL 4

First internal ADC-Channel used.

## ◆ ADC_MAX_CHANNEL

#define ADC_MAX_CHANNEL 7

Last internal ADC-Channal used.

## ◆ ADCVoltsPerLSB

#define ADCVoltsPerLSB (2.56/1024)

Voltage step for one LSB of the AD converter.

## ◆ dividerP5

#define dividerP5 (4.7/(4.7+22))

Resistor divider for P5. Gives 7.03V FSR or 6.86mV/LSB.

## ◆ dividerP12

#define dividerP12 (4.7/(4.7+68))

Resistor divider for Unreg. Gives 39.6V FSR or 38.7mV/LSB.

## Typedef Documentation

## ◆ delay_t

typedef uint8_t delay_t

## Function Documentation

## ◆ DoFlags()

void DoFlags | ( |  | ) |

Process Communication-, Time- and Key-Flags.

Here is the call graph for this function:

## ◆ Ticks2HMS()

void Ticks2HMS | ( | uint32_t | ticks,
|  | char * | str,
|  | size_t | n
| ) |  |

## Variable Documentation

## ◆ mcusrMirror

uint8_t mcusrMirror

Copy of the MCUSR taken shortly after reset.

## ◆ tickCnt

volatile uint8_t tickCnt

Counter for timer0 interrupts.

## ◆ secCnt

volatile uint8_t secCnt

Seconds of the RTC.

## ◆ minCnt

volatile uint8_t minCnt

Minutes of the RTC.

## ◆ hrCnt

volatile uint8_t hrCnt

Hours of the RTC.

## ◆ sFlags

volatile uint8_t sFlags

Flags used for Screen Control.

## ◆ SFLAG_REFRESH

const uint8_t SFLAG_REFRESH =1
| static

Is set three times per Second when Refresh-Items should be handled.

## ◆ dFlags

volatile uint8_t dFlags

Flags Controlling Debug Output.

## ◆ DFLAG_ADC

const uint8_t DFLAG_ADC =1
| static

Gives information about voltage and current measurements.

## ◆ DFLAG_SENSOR

const uint8_t DFLAG_SENSOR =2
| static

Gives information about sensors and on chip ADC.

## ◆ DFLAG_AH

const uint8_t DFLAG_AH =4
| static

Gives information about Ah and Wh calculations.

## ◆ DFLAG_RCHAN

const uint8_t DFLAG_RCHAN =8
| static

Gives information about channel resistance computation.

## ◆ eflag_descr

PGM_P const eflag_descr ={ eflag1,eflag2,eflag3,eflag4,eflag5,eflag6,eflag7 }

Array of strings containing a description for each flag.