|
Digital Scale
1.0
Digital Scale
|
Handles the 7-Segment Display. More...
Functions | |
| void | Int16toDisplayHex (uint16_t i, volatile uint8_t *p) |
| Writes 4 Digits to the Display RAM. More... | |
| void | Int24toDisplayHex (uint32_t l, volatile uint8_t *p) |
| Writes 6 Digits to the Display RAM. More... | |
| void | Int8toDisplayHex (uint8_t b, volatile uint8_t *p) |
| Writes 2 Hex-Digits to the Display RAM. More... | |
| void | NextDigit (void) |
| Advances to the next Digit. More... | |
| void | SetDisplayAltLoBat (void) |
| Sets the alternate display to LoBat. More... | |
| void | SetDisplayAltUncal (void) |
| Sets the alternate display to unCal. More... | |
| void | SetDisplayAuto0 (volatile uint8_t *adr) |
| Sets the display to Auto-0. More... | |
| void | SetDisplayCAL (void) |
| Sets the display to CAL (Calibration) More... | |
| void | SetDisplayCLR (volatile uint8_t *adr) |
| Clears the Display. More... | |
| void | SetDisplayDefCon (void) |
| Sets the display to dEFCon (default config) More... | |
| void | SetDisplayDontTouch (void) |
| Sets the display to don't touch ("-touch") More... | |
| void | SetDisplayHiRes (void) |
| Sets the display to HI (High Resolution) for two seconds. More... | |
| void | SetDisplayLoRes (void) |
| Sets the display to LO (Low Resolution) for two seconds. More... | |
| void | SetDisplayRef (void) |
| Sets the display to rEF. More... | |
Variables | |
| const uint8_t | chars [] |
| The Character to 7-Segment mapping. More... | |
| volatile uint8_t | display [7] |
| Display RAM for normal Display display[0] is left. More... | |
| volatile uint8_t | display_alt [7] |
| Display RAM for alternate Display display_alt[5] is right. More... | |
| volatile uint8_t | displayBlinkMask |
| Sets Display Blink Mode. More... | |
| volatile uint8_t | displayBrightness |
| The current Display Brightness. More... | |
| volatile DISPLAY_MODE_t | displayMode |
| Selects the Display Mode. More... | |
| bool | lzb |
| Controlls Leading Zero Blanking. More... | |
Handles the 7-Segment Display.
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/>.
| void NextDigit | ( | void | ) |
Advances to the next Digit.
This is done every ms. Since we have 6 digits the display refresh rate is 166.7Hz. This is fairly high but if dimming is used it reduces to 41 Hz allowing 3 different brightnesses plus off.
| void Int8toDisplayHex | ( | uint8_t | b, |
| volatile uint8_t * | p | ||
| ) |
Writes 2 Hex-Digits to the Display RAM.
| b | The Byte |
| p | The address inside the Display RAM |
The second digit is only displayed if it's address is not display[7] or display_alt[6]. This allows the display to be shiftet right by one to make room for a '-' sign.
| void Int16toDisplayHex | ( | uint16_t | i, |
| volatile uint8_t * | p | ||
| ) |
Writes 4 Digits to the Display RAM.
| i | The Uint16 (packed BCD or packed HEX) |
| p | The address inside the Display RAM |
| void Int24toDisplayHex | ( | uint32_t | l, |
| volatile uint8_t * | p | ||
| ) |
Writes 6 Digits to the Display RAM.
| l | The Uint32 (packed BCD or packed HEX) |
| p | The address inside the Display RAM |
| void SetDisplayCLR | ( | volatile uint8_t * | adr) |
Clears the Display.
| adr | The Display Memory. May be display or display_alt. |
| void SetDisplayAuto0 | ( | volatile uint8_t * | adr) |
Sets the display to Auto-0.
| adr | The Display Memory. May be display or display_alt. |
Writes "Auto-0" to the selected display RAM
| void SetDisplayDontTouch | ( | void | ) |
Sets the display to don't touch ("-touch")
This is used during calibration while averaging the zero weight or reference weight which each take about 13s. Display mode is set to normal by this function.
| void SetDisplayRef | ( | void | ) |
Sets the display to rEF.
This is used during calibration to request a reference weight. Display mode is set to normal by this function.
| void SetDisplayAltLoBat | ( | void | ) |
Sets the alternate display to LoBat.
This is always done in alternate display mode so display mode is set to alternate by this function.
| void SetDisplayAltUncal | ( | void | ) |
Sets the alternate display to unCal.
This is always done before entering the main loop if ERR_UNCAL is set in eFlags
| void SetDisplayDefCon | ( | void | ) |
Sets the display to dEFCon (default config)
This is used during calibration to request a reference weight. Display mode is set to normal by this function.
| void SetDisplayCAL | ( | void | ) |
Sets the display to CAL (Calibration)
This is used during calibration to indicate The beginning of the procedure Display mode is set to normal by this function.
| void SetDisplayHiRes | ( | void | ) |
Sets the display to HI (High Resolution) for two seconds.
A double click is used to change between fast (low resolution) and precision (high resolution, but slow). This routine is used to indicate high resolution mode. It includes a delay for two seconds.
| void SetDisplayLoRes | ( | void | ) |
Sets the display to LO (Low Resolution) for two seconds.
A double click is used to change between fast (low resolution) and precision (high resolution, but slow). This routine is used to indicate low resolution (fast) mode. It includes a delay for two seconds.
| volatile uint8_t display[7] |
Display RAM for normal Display display[0] is left.
| volatile uint8_t display_alt[7] |
Display RAM for alternate Display display_alt[5] is right.
| volatile uint8_t displayBrightness |
The current Display Brightness.
Values from 0 to 3 are allowed. 0=display off, 3=full brightness
| bool lzb |
Controlls Leading Zero Blanking.
Set to TRUE before you display a Number with leading zero blanking.
| const uint8_t chars[] |
The Character to 7-Segment mapping.
Bit 0 = Segment A
...
Bit 6 = Segment G
Bit 7 = DP
Set display[] to any of this values or use custom characters.
1.8.4