Power Control: Configuration Data

Updated 2001-6-24
The configuration data are the parameters held by the power control system that modfiy how it acts. Changing this data does not require a recompile of code -- it only takes setting data stored in EEPROM with the EEPROM Write command.

Note the parallelism in the temperature and volatge thresholds.

Temperature thresholds

All temperatures are used internally as signed 8-bit integers, but must be specified as unsigned two digit hexadecimal numbers as per the protocol.
Name Address Usage
LOW_TEMP_OFF
0
Before power is applied to the computer, the temperature must be higher than this value.
HIGH_TEMP_OFF
1
Before power is applied to the computer, the temperature must be lower than this value.
LOW_TEMP_ON
2
While power is applied to the computer, the temperature must be higher than this value.
HIGH_TEMP_ON
3
While power is applied to the computer, the temperature must be lower than this value.

Line Votlage Thresholds

These thresholds deal with the voltage on the supply that feeds the computer's power supply, not the voltage comming from the computer's power supply. In an automotive setup, this means measuring the voltage on the vehical's power supply, tipically 12 volts. The thresholds are specified in a unitless form and are compared directly with the result from an analog to digital converter.
Name Address Usage
LOW_VOLTAGE_OFF
4
Before power is applied to the computer, the voltage must be higher than this value.
HIGH_VOLTAGE_OFF
5
Before power is applied to the computer, the voltage must be lower than this value.
LOW_VOLTAGE_ON
6
While power is applied to the computer, the voltage must be higher than this value.
HIGH_VOLTAGE_ON
7
While power is applied to the computer, the voltage must be lower than this value.

Time Delays

Name Address Usage
THRESHOLD_DELAY
8
The time in seconds that the computer is allowed to run while at least one of the environmental inputs is outside of the thresholds.
UI_FORCED_SD_DELAY
9
The time the UI button must be held down to cause a forced shutdown.
POWER_ON_DELAY
10
The time delay between when running power is applied (car starts) until the system automatically applies power to the computer. See the operation discription for other conditions that must be met before the system will automatically apply power to the computer.
POWER_OFF_DELAY
11
The time delay between when running power is lost (car stops) until the system signals a shutdown. See the information on the configuration byte below for how to make the system signal a shutdown when the car stops. By default, shutdown is not signaled when running power is lost, but the computer is told about the power loss.
POWER_OFF_FORCE
12
The time given for the computer to shutdown when the shutdown is forced. The computer may request more time for the shutdown, but it can only request more time once and it will not be granted more time than the length of this delay.

Other defines

Name Address Usage
CONFIG_BYTE
13
The wonderful configuration byte. It is so important that its explination is in another section below.
TOTAL_CONF_DATA
14
The total number of bytes of all this data.

Configuration Byte

This byte is used as a set of toggles that allow the behavior of the system to be customized without requiring changing the source code, recompiling, and reloading the binary onto the microcontroller. Technically, none of the configuration bits are mutually exclusive so some strange behavior is possible.
Name Bit Default
value
Usage
CONFBIT_USE_EXT_ON
0
1
If set, the external power input will be used like the UI button to turn on the computer. This can be used to turn on the computer along with a car stereo in the same way the power of an external amp can be controlled. This does not affect shutting down the computer, just turning it on.
CONFBIT_USE_EXT_OFF
1
0
If set, the external power input will be used like the UI button to shutdown the computer. This can be used to turn off the computer along with a car stereo in the same way the power of an external amp can be controlled. This does not affect turing on the computer, just shutting it down.
CONFBIT_SD_REQ_AT_STOP
2
0
When set, the system will request that the computer shutdown when running power is lost.
CONFBIT_SAVE_BATT
3
0
When set, the system will force the computer to shutdown when running power is lost.
CONFBIT_USE_BATT
4
0
When set, the system will allow the computer to be turned on when running power is not present.