Defines | Functions

leds.c File Reference

Methods to control voltage and current display. More...

#include <avr/io.h>
#include "xtypes.h"
#include "global.h"
#include "timer.h"
#include "safety.h"
#include "voltage.h"
#include "current.h"
#include "leds.h"
Include dependency graph for leds.c:

Go to the source code of this file.

Defines

#define EXPORT
#define VOLT_10V   448U
 ADC value for 10.0 Volt.
#define VOLT_10V5   472U
 ADC value for 10.5 Volt.
#define VOLT_11V   496U
 ADC value for 11.0 Volt.
#define VOLT_11V5   520U
 ADC value for 11.5 Volt.
#define VOLT_12V   544U
 ADC value for 12.0 Volt.
#define CURR_20A   75U
 ADC value for 20 Ampere.
#define CURR_15A   56U
 ADC value for 15 Ampere.
#define CURR_10A   37U
 ADC value for 10 Ampere.
#define CURR_5A   17U
 ADC value for 5 Ampere.
#define CURR_2A   8U
 ADC value for 2 Ampere.
#define CURR_0A   0U
 ADC value for 0 Ampere.

Functions

void leds_Init (void)
 Init function to initiate related hardware.
void leds_ShowVoltage (void)
 Method to display the battery voltage.
void leds_ShowCurrent (void)
 Method to display the motor current.

Detailed Description

Author:
Philipp Bank
Copyright:
Creative Commons by-nc-sa 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)

This module provides functions to control the voltage and current LED displays.

Since you cannot light up both displays at the same time, another function (see timer.c) will be required to call leds_ShowVoltage() and leds_ShowCurrent() alternately.

Multiplexing doesn't require exernal means but is done in this functions.

Definition in file leds.c.