Tested Firmware Version
- TEXAS INSTRUMENTS bq40z50
- ATMEL ATmega32HVB
Battery controller probing requests. 0x0A=Atmel, 0x16=TI
Actual Current is signed.
Power management for the LC-Display.
Display will be scrolled (11 digits).
HRD can be connected to external devices like personal computers to transfer and store the extracted technical data.
https://github.com/peterloes/HRD/blob/master/Getting_Started_Tutorial/1_poster_overview.pdf
The standalone HRD features EFM32 ...the world´s most energy friendly microcontrollers
ARM Cortex-M3 EFM32G230F128
Code Snippets
Make quick changes to the Source Code.
https://github.com/peterloes/HRD/blob/master/Software/main.c
/*! List of items which can be displayed
*
* This array contains a list of items that can be displayed on the LCD.
* Element 0 is a special case, it shows the name, version, and date of
* the firmware image. Usually up/down push buttons are used to select
* the item to be displayed.
*
* The order of these items may be rearranged by the user. Single or
* groups of entries can be de-activated by commenting them out.
*/
static const ITEM l_Item[] =
{ // [1234567890123456] Cmd Frmt
{ ">>> HRDevice <<<", SBS_NONE, FRMT_FW_VERSION },
{ "Battery at SMBus", SBS_NONE, FRMT_BAT_CTRL },
{ "Supply Battery", SBS_NONE, FRMT_CR2032_BAT },
{ "Manufacturer", SBS_ManufacturerName, FRMT_STRING },
{ "Device Name", SBS_DeviceName, FRMT_STRING },
{ "Device Type", SBS_DeviceChemistry, FRMT_STRING },
{ "Serial Number", SBS_SerialNumber, FRMT_HEX },
{ "Production Date", SBS_ManufactureDate, FRMT_DATE },
https://github.com/peterloes/HRD/blob/master/Software/drivers/BatteryMon.c
/*!@brief Probe List of supported Battery Controllers */
static const BC_INFO l_ProbeList[] =
{ // addr type name (maximum 10 characters!)
{ 0x0A, BCT_ATMEL, "ATMEL" },
{ 0x16, BCT_TI, "TI bq40z50", },
{ 0x00, BCT_UNKNOWN, "" } // End of the list
};
/*!@brief SBS Commands
*
* These are the defines for the registers of the battery controller. Each
* define contains the following bit fields:
* - Bit 17:15 specify the controller type where the define belongs to. Bit 16
* (0x10000) represents the Atmel controller, while bit 17 (0x20000) specifies
* the TI controller. If both bits are set (0x30000), the register exists in
* ...