From f2d78236933daa78dcd844269e6336a1da3c17e1 Mon Sep 17 00:00:00 2001 From: Semyon Zernov Date: Sat, 17 Dec 2022 17:45:15 +0300 Subject: [PATCH] update to 1.48m --- firmware/ADS7843.c | 19 +- firmware/CHANGES | 36 +- firmware/CHANGES.de | 34 +- firmware/Clones | 81 +- firmware/EUPL-v1.2.txt | 287 ++++++ firmware/IR_RX.c | 10 + firmware/Makefile | 18 +- firmware/README | 88 +- firmware/README.de | 79 +- firmware/adjust.c | 26 +- firmware/bitmaps/symbols_24x24_alt1_h.h | 14 +- firmware/bitmaps/symbols_24x24_alt1_hf.h | 14 +- firmware/bitmaps/symbols_24x24_alt1_vfp.h | 14 +- firmware/bitmaps/symbols_24x24_alt1_vp_f.h | 14 +- firmware/bitmaps/symbols_24x24_alt2_h.h | 14 +- firmware/bitmaps/symbols_24x24_alt2_hf.h | 14 +- firmware/bitmaps/symbols_24x24_alt2_vfp.h | 14 +- firmware/bitmaps/symbols_24x24_alt2_vp_f.h | 15 +- firmware/bitmaps/symbols_24x24_h.h | 12 +- firmware/bitmaps/symbols_24x24_hf.h | 12 +- firmware/bitmaps/symbols_24x24_old_h.h | 12 +- firmware/bitmaps/symbols_24x24_old_hf.h | 12 +- firmware/bitmaps/symbols_24x24_old_vfp.h | 18 +- firmware/bitmaps/symbols_24x24_old_vp_f.h | 12 +- firmware/bitmaps/symbols_24x24_vfp.h | 16 +- firmware/bitmaps/symbols_24x24_vp_f.h | 14 +- firmware/bitmaps/symbols_30x32_alt1_hf.h | 16 +- firmware/bitmaps/symbols_30x32_alt2_hf.h | 16 +- firmware/bitmaps/symbols_30x32_hf.h | 12 +- firmware/bitmaps/symbols_30x32_old_hf.h | 12 +- firmware/bitmaps/symbols_32x32_alt1_hf.h | 16 +- firmware/bitmaps/symbols_32x32_alt2_hf.h | 16 +- firmware/bitmaps/symbols_32x32_hf.h | 12 +- firmware/bitmaps/symbols_32x32_old_hf.h | 12 +- firmware/bitmaps/symbols_32x39_hf.h | 14 +- firmware/cap.c | 141 ++- firmware/colors.h | 5 +- firmware/commands.c | 123 ++- firmware/common.h | 18 +- firmware/config.h | 802 ++-------------- firmware/config_1280.h | 25 +- firmware/config_328.h | 30 +- firmware/config_644.h | 24 +- firmware/config_support.h | 1006 ++++++++++++++++++++ firmware/display.c | 219 ++++- firmware/functions.h | 27 +- firmware/main.c | 175 +++- firmware/probes.c | 16 +- firmware/resistor.c | 4 +- firmware/tools_misc.c | 57 +- firmware/user.c | 140 ++- firmware/variables.h | 28 +- 52 files changed, 2785 insertions(+), 1080 deletions(-) create mode 100644 firmware/EUPL-v1.2.txt create mode 100644 firmware/config_support.h diff --git a/firmware/ADS7843.c b/firmware/ADS7843.c index f86efec..d774a1d 100644 --- a/firmware/ADS7843.c +++ b/firmware/ADS7843.c @@ -579,13 +579,24 @@ uint8_t Touch_Adjust(void) /* tell user */ LCD_Clear(); /* clear display */ - LCD_CharPos(1, 1); + LCD_CharPos(1, 1); /* do we need LCD_CharPos()? */ // todo: make sure we output string only to display #ifdef UI_COLORED_TITLES - /* display: Touch Setup */ - Display_ColoredEEString(TouchSetup_str, COLOR_TITLE); + #ifdef UI_CENTER_ALIGN + Display_CenterLine(1); /* center block: 1 line */ + /* display: Touch Setup */ + Display_ColoredEEString_Center(TouchSetup_str, COLOR_TITLE); + #else + /* display: Touch Setup */ + Display_ColoredEEString(TouchSetup_str, COLOR_TITLE); + #endif #else - Display_EEString(TouchSetup_str); /* display: Touch Setup */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(1); /* center block: 1 line */ + Display_EEString_Center(TouchSetup_str); /* display: Touch Setup */ + #else + Display_EEString(TouchSetup_str); /* display: Touch Setup */ + #endif #endif diff --git a/firmware/CHANGES b/firmware/CHANGES index 993b3cb..0072f11 100644 --- a/firmware/CHANGES +++ b/firmware/CHANGES @@ -6,6 +6,34 @@ ------------------------------------------------------------------------------ +v1.48m 2022-12 +- Added remote command V_F_clamp for V_f of clamping diode for Schottky + transistors. +- Pin assignment for the 3 test pins/probes can be changed now (suggested by + dreieck@mikrocontroller.net). +- Optional confirmation beep for valid frame/packet in IR receiver/decoder ( + SW_IR_RX_BEEP) or after probing is done (UI_PROBING_DONE_BEEP). +- Updated license to EUPL v. 1.2. +- Option to center-align infos and some other texts (UI_CENTER_ALIGN). +- Option to show self-discharge voltage loss of a capacitor > 50nF ( + SW_C_VLOSS, suggested by indman@EEVblog). Also added as remote command. +- Option to show additional info for a possible potentiometer/trimpot ( + SW_R_TRIMMER) +- Workaround option for clones with SCT15L104W management MCU, in case the + tester turns off suddenly after the first probing cycle (PASSIVE_POWER_CTRL, + based on idea from lhlad@EEVblog). +- Added option to switch boost converter for Zener check by a dedicated I/O + pin (ZENER_SWITCHED, suggested by Per Hansson@EEVblog). +- New option to display values in a different color (UI_COLORED_VALUES, + suggested by indman@EEVblog). +- Added precompiler check for detecting if multiple displays are configured ( + suggested by Per Hansson@EEVblog). +- Moved supporting configuration management from config.h and config_.h + to a new header file (config_support.h). Also added a few additional + configuration checks. Fixed issue with missing text for SW_DHTXX (reported + by BroMarduk@EEVblog). +- Moved UJT symbol bitmap to standard symbols. + v1.47m 2022-07 - Fixed swapped resistor symbols in font_8x12t_iso8859-2_vfp.h and font_8x12t_iso8859-2_hf.h (reported by b0hoon@EEVblog). @@ -20,7 +48,7 @@ v1.47m 2022-07 - New 32x39 symbol set to match 26 pixel high fonts (SYMBOLS_32X39_HF, thanks to indman@EEVblog). - Added options to auto-hold ESR and inductance for C and L monitor ( - SW_MONITOR_HOLD_ESR, SW_MONITOR_HOLD_L, suggested by theHWcav@EEVblog). + SW_MONITOR_HOLD_ESR, SW_MONITOR_HOLD_L, suggested by theHWcave@EEVblog). - Added character translations for inversed pin numbers to Serial_Char(). - Added option for /RESX line on separate MCU port to ST7735 driver ( LCD_RES_PORT, LCD_RES_DDR, based on idea from lhlad@EEVblog). @@ -30,11 +58,11 @@ v1.47m 2022-07 symbol sets (thanks to indman@EEVblog). - Added additional positioning flags for fancy pinout (PIN_CENTER, PIN_ALT_CENTER, suggested by indman@EEVblog). -- Display small diode symbol before Vf for MOSFETs and IGBTs (suggested by - indman@EEVblog). +- Display small diode symbol in front of Vf for MOSFETs and IGBTs (suggested + by indman@EEVblog). - Added numbers 1-3 and character x with reversed color plus degree character to font_8x16alt_win1251_hf.h. Also updated 1-3 and x with reversed color in - font_8x8alt_win1251_vf.h, Same for font_16x26_win1251_hf.h (thanks to + font_8x8alt_win1251_vf.h. Same for font_16x26_win1251_hf.h (thanks to indman@EEVblog). - Added option to disable display of text based pinout of the body diode for MOSTFETs (UI_NO_BODYDIODE_TEXTPINOUT, suggested by indman@EEVblog). diff --git a/firmware/CHANGES.de b/firmware/CHANGES.de index 613ea2f..1bcd17d 100644 --- a/firmware/CHANGES.de +++ b/firmware/CHANGES.de @@ -6,6 +6,36 @@ ------------------------------------------------------------------------------ +v1.48m 2022-12 +- Fernsteuerkommando V_F_clamp für V_f der Klemmdiode von Schottky- + Transistoren. +- Pinzuordnung für die drei Testpins kann nun geändert werden (Vorschlag von + dreieck@mikrocontroller.net). +- Optionaler Bestätigungston für gültiges Datenpaket im IR-Empfänger/Decoder ( + SW_IR_RX_BEEP) oder nach der Bauteilesuche (UI_PROBING_DONE_BEEP). +- Lizenz auf EUPL v. 1.2 aktualisiert. +- Option zur zentrierten Ausgabe von Infos und ein paar anderen Texten ( + UI_CENTER_ALIGN). +- Option zur Anzeige des Spannungsverlusts durch Selbstentladung bei + Kondensatoren > 50nF (SW_C_VLOSS, Vorschlag von indman@EEVblog). Auch + als Fernsteuerkommando implementiert. +- Option zur Anzeige zusätzlicher Infos bei einem möglichen Poti/Trimmer ( + SW_R_TRIMMER) +- Workaround-Option für Tester mit SCT15L104W Management-MCU, wenn der Tester + sich plötzlich nach der ersten Bauteilesuche abschaltet (PASSIVE_POWER_CTRL, + nach Idee von lhlad@EEVblog). +- Option zum Schalten des Boost-Konverters für den Zener-Test über festen + I/O-Pin (ZENER_SWITCHED, Vorschlag von Per Hansson@EEVblog). +- Option zur Anzeige von Werten in eigener Farbe (UI_COLORED_VALUES, Vorschlag + von indman@EEVblog). +- Überprüfung durch Precompiler, ob mehrere Anzeigemodule konfiguriert sind ( + Vorschlag von Per Hansson@EEVblog). +- Unterstützendes Konfigurationsmanagement von config.h und config_.h in + neue Headerdatei verschoben (config_support.h). Dabei ein paar zusätzliche + Konfigurationsprüfungen ergänzt. Problem mit fehlendem Text für SW_DHTXX + beseitigt (gemeldet von BroMarduk@EEVblog). +- Symbolbitmap für UJT zu Standardsymbolen verschoben. + v1.47m 2022-07 - Korrektur von verdrehten Widerstandssymbolen in font_8x12t_iso8859-2_vfp.h und font_8x12t_iso8859-2_hf.h (gemeldet von b0hoon@EEVblog). @@ -21,7 +51,7 @@ v1.47m 2022-07 - Neuer Symbolsatz 32x39, ideal für Zeichensätze mit Höhe von 26 Pixel ( SYMBOLS_32X39_HF, Dank an indman@EEVblog). - Optionen zum Halten von ESR und Induktivität für C und L-Monitor ( - SW_MONITOR_HOLD_ESR, SW_MONITOR_HOLD_L, Vorschlag von theHWcav@EEVblog). + SW_MONITOR_HOLD_ESR, SW_MONITOR_HOLD_L, Vorschlag von theHWcave@EEVblog). - Zeichenübersetzung für inverse Testpinnummern in Serial_Char() ergänzt. - ST7735-Treiber um Option für /RESX auf separatem Port erweitert ( LCD_RES_PORT, LCD_RES_DDR, nach Idee von lhlad@EEVblog). @@ -108,7 +138,7 @@ v1.44m 2021-08 ralleeiner@mikrocontroller.net). - Änderung der Entladefunktion: Bei einem Entladeproblem wird nun die unbelastete Spannung des DUTs gemessen und von der Entlade-Fehlermeldung - angezeift, z.B. die unbelastete Spannung einer Batterie. + angezeigt, z.B. die unbelastete Spannung einer Batterie. - Verdrehtes Diodensymbol für zweite Diode bei Ausgabe von anti-parallelen Dioden korrigiert (gemeldet von horo@EEVblog). - Option für low-aktives Backlight im HD44780-Treiber für PCF8574-I2C-Adapter diff --git a/firmware/Clones b/firmware/Clones index 3527f97..6bfdb9a 100644 --- a/firmware/Clones +++ b/firmware/Clones @@ -47,7 +47,11 @@ DIY Kit "AY-AT" / GM328A Hints: - Some GM328A have an ST7735 semi-compatible display which won't run with the standard ST7735 driver. On those modules the level shifter is followed by an - additional IC (U3). In this case use the Semi-ST7735 driver. + additional IC (U3, some MCU). In this case use the Semi-ST7735 driver. +- The model with a round PCB uses also an ST7735 semi-compatible display. This + one comes with a level shifter (CD4050) followed by a shift register ( + 74HC164) and some MCU on the main PCB. The display doesn't support high + SPI clock rates. So dont run the ATmega with any clock rate higher than 8MHz. Hardware Options: #define HW_ENCODER @@ -275,6 +279,10 @@ Hardware Options: #define FREQ_COUNTER_PRESCALER 16 /* 16:1 */ #define HW_ADJUST_CAP +Optionally with boost converter driver mod: +#define ZENER_SWITCHED +#define ZENER_BOOST_LOW /* low active */ + Workarounds: #define NO_HFE_C_RL /* if hFE values too high */ @@ -440,6 +448,10 @@ T3/T4 - settings provided by tom666@EEVblog - LCD_RESET could be also PD0 +Beware: +- Some newer T4 come with an APT32F172K8T6 (fake Atmel marking) instead of + an ATmega328. This MCU is not supported. + LCD module: #define LCD_ST7565R #define LCD_GRAPHIC /* graphic display */ @@ -472,6 +484,53 @@ Some T4 variants use a slightly different pin assignment for the display: ------------------------------------------------------------------------------ +Multifunction Tester LCR-T5 +- ATmega328, 8MHz clock +- ST7565 display (bit-bang SPI) +- settings provided by techie@EEVblog + +Hardware Options: +#define HW_REF25 + +LCD module: +#define LCD_ST7565R /* display controller ST7565R */ +#define LCD_GRAPHIC /* graphic display */ +#define LCD_SPI /* SPI interface */ +#define LCD_PORT PORTD /* port data register */ +#define LCD_DDR DDRD /* port data direction register */ +#define LCD_RESET PD2 /* port pin used for /RES (optional) */ +#define LCD_CS PD5 /* port pin used for /CS1 (optional) */ +#define LCD_A0 PD1 /* port pin used for A0 */ +#define LCD_SCL PD3 /* port pin used for SCL */ +#define LCD_SI PD4 /* port pin used for SI (data input) */ +#define LCD_DOTS_X 128 /* number of horizontal dots */ +#define LCD_DOTS_Y 64 /* number of vertical dots */ +//#define LCD_OFFSET_X /* enable x offset of 4 dots */ +//#define LCD_FLIP_X /* enable horizontal flip */ +#define LCD_FLIP_Y /* enable vertical flip */ +#define LCD_START_Y 0 /* start line (0-63) */ +#define LCD_CONTRAST 25 /* default contrast 22 (0-63) */ +#define FONT_8X8_VF /* 8x8 font */ +#define SYMBOLS_24X24_VFP /* 24x24 symbols */ +#define SPI_BITBANG /* bit-bang SPI */ +#define SPI_PORT LCD_PORT /* SPI port data register */ +#define SPI_DDR LCD_DDR /* SPI port data direction register */ +#define SPI_SCK LCD_SCL /* port pin used for SCK */ +#define SPI_MOSI LCD_SI /* port pin used for MOSI */ + +In case the LCD contrast doesn't work properly edit function LCD_Init() in +ST7565R.c and change + + /* set contrast: resistor ratio 6.5 */ + LCD_Cmd(CMD_V0_RATIO | FLAG_RATIO_65); + +to + + /* set contrast: resistor ratio 4.5 */ + LCD_Cmd(CMD_V0_RATIO | FLAG_RATIO_45); + +------------------------------------------------------------------------------ + Multifunction Tester TC-1 and family (T7) with ATmega324/644 - ATmega324 (very poor pin assignment), 16MHz clock later models may have an ATmega644 @@ -479,13 +538,18 @@ Multifunction Tester TC-1 and family (T7) with ATmega324/644 - external 2.5V voltage reference (TL431) - fixed IR receiver module - boost converter for Zener check - (runs all the time, non-standard voltage divider 100k/12k) + (runs all the time, non-standard voltage divider 100k/12k, + no constant current source, just series resistor) - fixed adjustment cap (in case of problems replace MLCC with 220nF film cap) - powered by Li-Ion cell 3.7V - sample testers provided by jellytot@EEVblog and joystik@EEVblog - initial information provided by indman@EEVblog +Beware: +- Some newer T7 come with an APT32F172K8T6 (fake Atmel marking) instead of + an ATmega328. This MCU is not supported. + Hints: - Control MCU U4 (STC15L104W) needs to be replaced with a simple two-transistor circuit (TC1-Mod, see source repository for TC1-Mod.kicad.tgz, 5µA standby @@ -509,6 +573,8 @@ Hints: PB5 (display's D/C) and PB6 (display's SDA). - You can also get the frequency counter by using PB0 (T0) as input und adding a simple input stage. +- In case the tester turns off suddenly after the first probing cycle try to + enable the workaround option PASSIVE_POWER_CTRL. - PD0 solder bridge (open: pull-up, shorted: Gnd, unused by m-firmware) Hardware Options: @@ -526,6 +592,9 @@ Optionally: #define ZENER_VOLTAGE_MIN 1000 /* min. voltage in mV */ #define ZENER_VOLTAGE_MAX 40000 /* max. voltage in mV */ +Workarounds (if required): +#define PASSIVE_POWER_CTRL /* if tester turns off suddenly */ + Power management settings: #define BAT_DIRECT #define BAT_OFFSET 0 @@ -605,13 +674,16 @@ Multifunction Tester T7 with ATmega328 /RESET line on separate MCU port - fixed IR receiver module - boost converter for Zener check - (runs all the time, about 26V, non-standard voltage divider 100k/12k) + (runs all the time, about 26V, non-standard voltage divider 100k/12k, + no constant current source, just series resistor) - connector for serial TTL interface (J5, 5V) - settings provided by lhlad@EEVblog (see https://gitlab.com/a11059/t7_328_m) Hints: - This model can't provide any signal output (PWM/squarewave/etc.). - Purpose of additional MCU (STC15L104W) is unknown. +- In case the tester turns off suddenly after the first probing cycle try to + enable the workaround option PASSIVE_POWER_CTRL. Hardware Options: #define HW_ZENER @@ -626,6 +698,9 @@ Optionally: #define ZENER_VOLTAGE_MIN 500 #define ZENER_VOLTAGE_MAX 25500 +Workarounds (if required): +#define PASSIVE_POWER_CTRL /* if tester turns off suddenly */ + Power management settings: #define BAT_DIRECT #define BAT_OFFSET 0 diff --git a/firmware/EUPL-v1.2.txt b/firmware/EUPL-v1.2.txt new file mode 100644 index 0000000..4153cd3 --- /dev/null +++ b/firmware/EUPL-v1.2.txt @@ -0,0 +1,287 @@ + EUROPEAN UNION PUBLIC LICENCE v. 1.2 + EUPL © the European Union 2007, 2016 + +This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined +below) which is provided under the terms of this Licence. Any use of the Work, +other than as authorised under this Licence is prohibited (to the extent such +use is covered by a right of the copyright holder of the Work). + +The Work is provided under the terms of this Licence when the Licensor (as +defined below) has placed the following notice immediately following the +copyright notice for the Work: + + Licensed under the EUPL + +or has expressed by any other means his willingness to license under the EUPL. + +1. Definitions + +In this Licence, the following terms have the following meaning: + +- ‘The Licence’: this Licence. + +- ‘The Original Work’: the work or software distributed or communicated by the + Licensor under this Licence, available as Source Code and also as Executable + Code as the case may be. + +- ‘Derivative Works’: the works or software that could be created by the + Licensee, based upon the Original Work or modifications thereof. This Licence + does not define the extent of modification or dependence on the Original Work + required in order to classify a work as a Derivative Work; this extent is + determined by copyright law applicable in the country mentioned in Article 15. + +- ‘The Work’: the Original Work or its Derivative Works. + +- ‘The Source Code’: the human-readable form of the Work which is the most + convenient for people to study and modify. + +- ‘The Executable Code’: any code which has generally been compiled and which is + meant to be interpreted by a computer as a program. + +- ‘The Licensor’: the natural or legal person that distributes or communicates + the Work under the Licence. + +- ‘Contributor(s)’: any natural or legal person who modifies the Work under the + Licence, or otherwise contributes to the creation of a Derivative Work. + +- ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of + the Work under the terms of the Licence. + +- ‘Distribution’ or ‘Communication’: any act of selling, giving, lending, + renting, distributing, communicating, transmitting, or otherwise making + available, online or offline, copies of the Work or providing access to its + essential functionalities at the disposal of any other natural or legal + person. + +2. Scope of the rights granted by the Licence + +The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +sublicensable licence to do the following, for the duration of copyright vested +in the Original Work: + +- use the Work in any circumstance and for all usage, +- reproduce the Work, +- modify the Work, and make Derivative Works based upon the Work, +- communicate to the public, including the right to make available or display + the Work or copies thereof to the public and perform publicly, as the case may + be, the Work, +- distribute the Work or copies thereof, +- lend and rent the Work or copies thereof, +- sublicense rights in the Work or copies thereof. + +Those rights can be exercised on any media, supports and formats, whether now +known or later invented, as far as the applicable law permits so. + +In the countries where moral rights apply, the Licensor waives his right to +exercise his moral right to the extent allowed by law in order to make effective +the licence of the economic rights here above listed. + +The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to +any patents held by the Licensor, to the extent necessary to make use of the +rights granted on the Work under this Licence. + +3. Communication of the Source Code + +The Licensor may provide the Work either in its Source Code form, or as +Executable Code. If the Work is provided as Executable Code, the Licensor +provides in addition a machine-readable copy of the Source Code of the Work +along with each copy of the Work that the Licensor distributes or indicates, in +a notice following the copyright notice attached to the Work, a repository where +the Source Code is easily and freely accessible for as long as the Licensor +continues to distribute or communicate the Work. + +4. Limitations on copyright + +Nothing in this Licence is intended to deprive the Licensee of the benefits from +any exception or limitation to the exclusive rights of the rights owners in the +Work, of the exhaustion of those rights or of other applicable limitations +thereto. + +5. Obligations of the Licensee + +The grant of the rights mentioned above is subject to some restrictions and +obligations imposed on the Licensee. Those obligations are the following: + +Attribution right: The Licensee shall keep intact all copyright, patent or +trademarks notices and all notices that refer to the Licence and to the +disclaimer of warranties. The Licensee must include a copy of such notices and a +copy of the Licence with every copy of the Work he/she distributes or +communicates. The Licensee must cause any Derivative Work to carry prominent +notices stating that the Work has been modified and the date of modification. + +Copyleft clause: If the Licensee distributes or communicates copies of the +Original Works or Derivative Works, this Distribution or Communication will be +done under the terms of this Licence or of a later version of this Licence +unless the Original Work is expressly distributed only under this version of the +Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee +(becoming Licensor) cannot offer or impose any additional terms or conditions on +the Work or Derivative Work that alter or restrict the terms of the Licence. + +Compatibility clause: If the Licensee Distributes or Communicates Derivative +Works or copies thereof based upon both the Work and another work licensed under +a Compatible Licence, this Distribution or Communication can be done under the +terms of this Compatible Licence. For the sake of this clause, ‘Compatible +Licence’ refers to the licences listed in the appendix attached to this Licence. +Should the Licensee's obligations under the Compatible Licence conflict with +his/her obligations under this Licence, the obligations of the Compatible +Licence shall prevail. + +Provision of Source Code: When distributing or communicating copies of the Work, +the Licensee will provide a machine-readable copy of the Source Code or indicate +a repository where this Source will be easily and freely available for as long +as the Licensee continues to distribute or communicate the Work. + +Legal Protection: This Licence does not grant permission to use the trade names, +trademarks, service marks, or names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the copyright notice. + +6. Chain of Authorship + +The original Licensor warrants that the copyright in the Original Work granted +hereunder is owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each Contributor warrants that the copyright in the modifications he/she brings +to the Work are owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each time You accept the Licence, the original Licensor and subsequent +Contributors grant You a licence to their contributions to the Work, under the +terms of this Licence. + +7. Disclaimer of Warranty + +The Work is a work in progress, which is continuously improved by numerous +Contributors. It is not a finished work and may therefore contain defects or +‘bugs’ inherent to this type of development. + +For the above reason, the Work is provided under the Licence on an ‘as is’ basis +and without warranties of any kind concerning the Work, including without +limitation merchantability, fitness for a particular purpose, absence of defects +or errors, accuracy, non-infringement of intellectual property rights other than +copyright as stated in Article 6 of this Licence. + +This disclaimer of warranty is an essential part of the Licence and a condition +for the grant of any rights to the Work. + +8. Disclaimer of Liability + +Except in the cases of wilful misconduct or damages directly caused to natural +persons, the Licensor will in no event be liable for any direct or indirect, +material or moral, damages of any kind, arising out of the Licence or of the use +of the Work, including without limitation, damages for loss of goodwill, work +stoppage, computer failure or malfunction, loss of data or any commercial +damage, even if the Licensor has been advised of the possibility of such damage. +However, the Licensor will be liable under statutory product liability laws as +far such laws apply to the Work. + +9. Additional agreements + +While distributing the Work, You may choose to conclude an additional agreement, +defining obligations or services consistent with this Licence. However, if +accepting obligations, You may act only on your own behalf and on your sole +responsibility, not on behalf of the original Licensor or any other Contributor, +and only if You agree to indemnify, defend, and hold each Contributor harmless +for any liability incurred by, or claims asserted against such Contributor by +the fact You have accepted any warranty or additional liability. + +10. Acceptance of the Licence + +The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ +placed under the bottom of a window displaying the text of this Licence or by +affirming consent in any other similar way, in accordance with the rules of +applicable law. Clicking on that icon indicates your clear and irrevocable +acceptance of this Licence and all of its terms and conditions. + +Similarly, you irrevocably accept this Licence and all of its terms and +conditions by exercising any rights granted to You by Article 2 of this Licence, +such as the use of the Work, the creation by You of a Derivative Work or the +Distribution or Communication by You of the Work or copies thereof. + +11. Information to the public + +In case of any Distribution or Communication of the Work by means of electronic +communication by You (for example, by offering to download the Work from a +remote location) the distribution channel or media (for example, a website) must +at least provide to the public the information requested by the applicable law +regarding the Licensor, the Licence and the way it may be accessible, concluded, +stored and reproduced by the Licensee. + +12. Termination of the Licence + +The Licence and the rights granted hereunder will terminate automatically upon +any breach by the Licensee of the terms of the Licence. + +Such a termination will not terminate the licences of any person who has +received the Work from the Licensee under the Licence, provided such persons +remain in full compliance with the Licence. + +13. Miscellaneous + +Without prejudice of Article 9 above, the Licence represents the complete +agreement between the Parties as to the Work. + +If any provision of the Licence is invalid or unenforceable under applicable +law, this will not affect the validity or enforceability of the Licence as a +whole. Such provision will be construed or reformed so as necessary to make it +valid and enforceable. + +The European Commission may publish other linguistic versions or new versions of +this Licence or updated versions of the Appendix, so far this is required and +reasonable, without reducing the scope of the rights granted by the Licence. New +versions of the Licence will be published with a unique version number. + +All linguistic versions of this Licence, approved by the European Commission, +have identical value. Parties can take advantage of the linguistic version of +their choice. + +14. Jurisdiction + +Without prejudice to specific agreement between parties, + +- any litigation resulting from the interpretation of this License, arising + between the European Union institutions, bodies, offices or agencies, as a + Licensor, and any Licensee, will be subject to the jurisdiction of the Court + of Justice of the European Union, as laid down in article 272 of the Treaty on + the Functioning of the European Union, + +- any litigation arising between other parties and resulting from the + interpretation of this License, will be subject to the exclusive jurisdiction + of the competent court where the Licensor resides or conducts its primary + business. + +15. Applicable Law + +Without prejudice to specific agreement between parties, + +- this Licence shall be governed by the law of the European Union Member State + where the Licensor has his seat, resides or has his registered office, + +- this licence shall be governed by Belgian law if the Licensor has no seat, + residence or registered office inside a European Union Member State. + +Appendix + +‘Compatible Licences’ according to Article 5 EUPL are: + +- GNU General Public License (GPL) v. 2, v. 3 +- GNU Affero General Public License (AGPL) v. 3 +- Open Software License (OSL) v. 2.1, v. 3.0 +- Eclipse Public License (EPL) v. 1.0 +- CeCILL v. 2.0, v. 2.1 +- Mozilla Public Licence (MPL) v. 2 +- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 +- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for + works other than software +- European Union Public Licence (EUPL) v. 1.1, v. 1.2 +- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong + Reciprocity (LiLiQ-R+). + +The European Commission may update this Appendix to later versions of the above +licences without producing a new version of the EUPL, as long as they provide +the rights granted in Article 2 of this Licence and protect the covered Source +Code from exclusive appropriation. + +All other changes or additions to this Appendix require the production of a new +EUPL version. diff --git a/firmware/IR_RX.c b/firmware/IR_RX.c index 460b775..275e2a4 100644 --- a/firmware/IR_RX.c +++ b/firmware/IR_RX.c @@ -1743,6 +1743,16 @@ void IR_Decode(uint8_t *PulseData, uint8_t Pulses) { IR_State = 0; /* reset multi packet state */ + #ifdef SW_IR_RX_BEEP + /* buzzer: short beep for valid packet */ + if (Flag >= PACKET_OK) /* valid packet */ + { + BUZZER_PORT |= (1 << BUZZER_CTRL); /* enable: set pin high */ + MilliSleep(20); /* wait for 20 ms */ + BUZZER_PORT &= ~(1 << BUZZER_CTRL); /* disable: set pin low */ + } + #endif + /* slow down display updates and try to skip early repeats */ MilliSleep(200); /* don't proceed too soon */ } diff --git a/firmware/Makefile b/firmware/Makefile index fbbd7d2..997156f 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -1,7 +1,7 @@ # # Makefile # -# (c) 2012-2021 by Markus Reschke +# (c) 2012-2022 by Markus Reschke # based on code from Markus Frejek and Karl-Heinz K�bbeler # @@ -29,7 +29,7 @@ MCU = atmega328 # - 8MHz : 8 # - 16MHz : 16 # - 20MHz : 20 -FREQ = 16 +FREQ = 8 # oscillator type # - internal RC oscillator : RC @@ -84,9 +84,9 @@ PARTNO = m328p #OPTIONS = -B 10.0 # Diamex ALL-AVR/AVR-Prog -# PROGRAMMER = avrispmkII -# PORT = usb -# OPTIONS = -B 1.0 +PROGRAMMER = avrispmkII +PORT = usb +OPTIONS = -B 1.0 # Pololu USB AVR Programmer #PROGRAMMER = stk500v2 @@ -104,9 +104,9 @@ PARTNO = m328p #OPTIONS = -B 5.0 # Arduino Uno bootloader via serial/USB -PROGRAMMER = arduino -PORT = /dev/ttyACM0 -OPTIONS = -D -b 115200 +#PROGRAMMER = arduino +#PORT = /dev/ttyACM0 +#OPTIONS = -D -b 115200 # Arduino Mega2560 bootloader via serial/USB #PROGRAMMER = wiring @@ -250,7 +250,7 @@ dist: clean ${DIST}/*.h ${DIST}/*.c ${DIST}/*.S ${DIST}/bitmaps/*.h \ ${DIST}/Makefile ${DIST}/README ${DIST}/CHANGES \ ${DIST}/README.de ${DIST}/CHANGES.de ${DIST}/Clones \ - ${DIST}/*.pdf ${DIST}/dep + ${DIST}/EUPL-v1.2.txt ${DIST}/dep # clean up clean: diff --git a/firmware/README b/firmware/README index facd901..2e55098 100644 --- a/firmware/README +++ b/firmware/README @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------ -Last edit: 2022-06-13 +Last edit: 2022-12-13 Content - About @@ -144,7 +144,7 @@ sufficient time to tell us his wishes regarding the license. Since the source code of this firmware version is a major rewrite with tons of new code and features, I think that this approach is justified. -Licensed under the EUPL V.1.1 +Licensed under the EUPL v. 1.2 + Additional Disclaimer @@ -1031,6 +1031,7 @@ to read. For displays with more then two text lines: - show key hints instead of cursor if available (UI_KEY_HINTS) +- center-align infos and some other texts (UI_CENTER_ALIGN) For graphic displays: - all options listed before @@ -1052,6 +1053,7 @@ For color graphic displays: - all options listed before - color coding for probes/testpins (UI_PROBE_COLORS) - dedicated color for titles (UI_COLORED_TITLES) +- dedicated color for values (not units, UI_COLORED_VALUES) - dedicated color for cursor and key hints (UI_COLORED_CURSOR) - color code for resistors (SW_R_E24_5_CC, SW_R_E24_1_CC and SW_R_E96_CC) @@ -1063,8 +1065,11 @@ integrated oscillator). The buzzer is controlled via a fixed pin (see BUZZER_CTRL in config_.h) and can be driven directly (< 20mA) or by a transistor (NPN or n-channel MOSFET). -At the moment the buzzer is only used by the continuity check. More use cases -will be added in the future. +At the moment the buzzer is used for +- continuity check (SW_CONTINUITY_CHECK) +- confirmation beep when probing is done (UI_PROBING_DONE_BEEP) +- confirmation beep for valid frame/packet in IR receiver/decoder + (SW_IR_RX_BEEP) * Communication with PC @@ -1161,6 +1166,9 @@ active during probing cycles. In both modes you can enter a menu with additional functions or power off the tester. For details please see below. +With the buzzer harwdare option you can enable a short confirmation beep for +a completed probing cycle (UI_PROBING_DONE_BEEP). + * Battery Monitoring @@ -1292,14 +1300,20 @@ measured is shown when the test button was pressed long enough for a stable test voltage. You may repeat this as long as you like. :) To exit the Zener tool press the test button twice quickly. -If your tester has just a 10:1 voltage divider without boost converter for -measuring an external voltage or the boost converter runs all the time, you -can choose the alternative mode (ZENER_UNSWITCHED) which measures the voltage +The boost converter can also be driven by a dedicated I/O pin for a longer +battery life (ZENER_SWITCHED). + +If your tester has just a 10:1 voltage divider without a boost converter for +measuring an external voltage, or the boost converter runs all the time, you +can choose an alternative mode (ZENER_UNSWITCHED) which measures the voltage periodically without pressing the test button. When you see the cursor at the bottom right between measurements you can exit the Zener tool by two short -presses of the test button. There's another option to run the Zener check -during normal probing (HW_PROBE_ZENER). When no component is found at the -standard probes the tester will check for a voltage at the Zener probes. +presses of the test button. + +There's another option to run the Zener check during normal probing ( +HW_PROBE_ZENER). When no component is found at the standard probes the tester +will check for a voltage at the Zener probes. This option is only available +when either ZENER_UNSWITCHED or ZENER_SWITCHED is enabled. In case your tester has a non-standard voltage divider (not 10:1) enable ZENER_DIVIDER_CUSTOM and specify the resistor values (ZENER_R1 and ZENER_R2). @@ -1441,7 +1455,7 @@ comparator or a Schmitt trigger logic gate seem to be the best choice to clean up the signal of the oscillator output. The CMOS quad NAND 4093 works fine for that. With a clean output signal the maximum capacitance is around 120nF ( beyond that the LC oscillator becomes unstable). The tester enforces a lower -frequency limit of 10kHz, i.e. the maximum values are theoretically 250nH +frequency limit of 10kHz, i.e. the maximum values are theoretically 250mH or 3.5µF if the LC oscillator would run stable. When starting the LC Meter the tester will run a self-adjustment indicated @@ -1618,7 +1632,7 @@ When the number of pulses stays the same for different buttons of the RC, the modulation is most likely PDM or PWM. A changing number of pulses indicates bi-phase modulation. -To exit the tool please press the test key. +To exit the tool please press the test key. Supported protocols and their data fields: @@ -1681,9 +1695,12 @@ Optional protocols (SW_IR_RX_EXTRA): : The carrier frequency of the TSOP receiver module doesn't have to match the RC -exactly. A mismatch reduces the possible range, but that doesn't matter much +exactly. A mismatch reduces the maximum distance, but that doesn't matter much for this application. +With the buzzer harwdare option you can enable a short confirmation beep for +valid data frames/packets (SW_IR_RX_BEEP). + - IR receiver module connected to probes @@ -2116,10 +2133,12 @@ If the values differ too much the tester assumes that there are two resistors instead of just a single one. In that case the tester displays the result as two resistors with the same pins, like "1 -- 2 -- 1", and the two different resistance values. For resistors lower than 10 Ohms an extra measurement with -a higher resolution is performed. +a higher resolution is performed. In some rare cases the tester might not be +able to detect a very low resistance. If that happens simply re-run the test. -In some rare cases the tester might not be able to detect a very low -resistance. If that happens simply re-run the test. +For checking potentiometers or trimpots you can enable the additional output +of the total resistance (Rt) and the ratio of the first resistor to the total +resistance (R1) in % (SW_R_TRIMMER). When the optional check for E series norm values (SW_R_E*) is enabled the tester takes the next lower and next higher norm value and compares them with @@ -2169,8 +2188,6 @@ be comparable with a 1kHz test. Anyway, the results are good enough to check electrolytic caps. For low value film caps you could get different results based on the MCU clock rate. I'd guess Mr. Fourier is able to explain this. -Alternatively you can also enable the old ESR measurement method. - Another measurement taken is the self-discharge leakage current for capacitors larger than 4.7 µF. It gives a hint about the state of an electrolytic cap. From my tests the typical value for a good electrolytic @@ -2180,6 +2197,9 @@ cap seems to be about: - 470-820 µF 4-7 µA - >1000 µF 5-7 µA per 1000 µF +If you're also interested in the voltage loss (in %) you can enable SW_C_VLOSS ( +for capacitors > 50nF). + The optional check for E series norm values is also available for capacitors ( SW_C_E*), but only in text mode because there are simply too many different color-codes for caps. @@ -2320,13 +2340,14 @@ quadrants. Usually some parameters will differ for each quadrant, like the gate trigger current (I_GT). In some cases it's possible that the tester's test current is sufficient to trigger the gate in one quadrant but not in another one. Since two test runs are needed to figure out the pins for MT1 and -MT2 the tester won't be able to distinguish between them in those cases, i.e. +MT2, the tester won't be able to distinguish between them in those cases, i.e. the pins could be swapped. You might also have TRIACs which can be triggered by the tester but have a too high holding current (I_H) preventing their correct detection. If a TRIAC's -gate trigger current is too high the tester will detect just a resistor -typically. +gate trigger current is too high the tester will detect typically just a +resistor. It's also possible that the tester falsely shows an NPN with a +parasitic BJT (NPN+) and base-emitter resistor. CLDs @@ -2369,6 +2390,19 @@ workaround: Enable NO_HFE_C_RL in config.h! +- clone with SCT15L104W management MCU: tester turns off suddenly + + Problem: + Tester turns off suddenly after the first probing cycle. Seems to be caused + by a voltage level issue (SCT15L104W is 3.3V, ATmega 5V). + + Affected testers: + T7-H, presumably also other models of the TC-1 family + + Workaround: + Enable PASSIVE_POWER_CTRL in config.h! + + * Known Issues - A storage cap (like Panasonic NF series) is detected as a diode or two @@ -2539,6 +2573,12 @@ Probing Commands: - applies to capacitor - example response: "3.25uA" + V_l + - returns V_loss (voltage loss due to self-discharge) + - requires output of self-discharge voltage loss to be enabled + - applies to capacitor > 4.7µF + - example response: "1.2%" + V_F - returns V_F value (forward voltage) - applies to diode and PUT @@ -2651,6 +2691,12 @@ Probing Commands: - applies to Zener diode or external voltage (hardware option) - example response: "6750mV" + V_F_clamp + - returns V_F value of clamping diode (forward voltage) + - applies to Schottky transistor / Schottky-clamped BJT + - requires detection of Schottky transistor to be enabled + - example response: "354mV" + * Helpful Links diff --git a/firmware/README.de b/firmware/README.de index 3c232f8..0915795 100644 --- a/firmware/README.de +++ b/firmware/README.de @@ -7,7 +7,7 @@ ------------------------------------------------------------------------------ -Letzte Änderung: 2022-06-13 +Letzte Änderung: 2022-12-13 Inhaltsübersicht: - Über den Tester @@ -145,7 +145,7 @@ Lizenz mitzuteilen. Da diese Firmwareversion eine komplett neue Version ist, die lediglich ein paar Ideen der ursprünglichen Firmware aufgreift, aber keinen Code teilt, sollte dieses Vorgehen gerechtfertigt sein. -Lizenziert unter der EUPL V.1.1 +Lizenziert unter der EUPL v. 1.2 + Zusätzliche Hinweise @@ -1047,6 +1047,7 @@ verst Für Anzeigen mit mehr als zwei Textzeilen: - Anzeige von Tastenhinweisen statt Cursor, sofern verfügbar (UI_KEY_HINTS) +- Infos und ein paar andere Text zentriert ausgeben (UI_CENTER_ALIGN) Für graphische Anzeigen: - alle vorherigen Optionen @@ -1069,6 +1070,7 @@ F - alle vorherigen Optionen - Farbcodierung für Testpins (UI_PROBE_COLORS) - Titel mit eigener Farbe (UI_COLORED_TITLES) +- Werte mit eigener Farbe (nicht Einheiten, UI_COLORED_VALUES) - Cursor und Tastenhinweise mit eigener Farbe (UI_COLORED_CURSOR) - Farbcode für Widerstände (SW_R_E24_5_CC, SW_R_E24_1_CC und SW_R_E96_CC) @@ -1081,8 +1083,11 @@ festen Port-Pin kontrolliert (siehe BUZZER_CTRL in config_.h) und kann direkt (< 20mA) bzw. über einen Transistor (NPN oder n-Kanal-MOSFET) angesteuert werden. -Im Augenblick wird der Summer nur vom Durchgangstest benutzt. Weitere -Anwendungsfälle werden in der Zukunft folgen. +Im Augenblick wird der Summer benutzt für +- Durchgangstest (SW_CONTINUITY_CHECK) +- Bestätigungston nach Bauteilesuche (UI_PROBING_DONE_BEEP) +- Bestätigungston für gültiges Datenpaket im IR-Empfänger/Decoder ( + SW_IR_RX_BEEP) * Kommunikation mit PC @@ -1183,6 +1188,9 @@ welche nur w In beiden Modi kannst Du das Hauptmenü aufrufen (siehe weiter unten). +Ist die Summer/Pieper-Option vorhanden, kannst Du einen kurzen Bestätigungston +für das Ende der Bauteilesuche aktivieren (UI_PROBING_DONE_BEEP). + * Batterieüberwachung @@ -1324,15 +1332,21 @@ ausreichend lange f beliebig oft wiederholt werden. Zum Beenden die Test-Taste zweimal kurz hintereinander drücken. +Der Boost-Konverter kann auch über einen festen I/O-Pin geschaltet werden ( +ZENER_SWITCHED), um die Batterielaufzeit zu erhöhen. + Wenn Dein Tester nur den 10:1 Spannungsteiler ohne Boost-Konverter zum Messen einer externen Spannung hat, oder der Boost-Konverter ständig läuft, -kannst Du den alternativen Modus (ZENER_UNSWITCHED) aktivieren, welcher +kannst Du einen alternativen Modus (ZENER_UNSWITCHED) aktivieren, welcher die Spannung periodisch ohne Drücken der Test-Taste misst. Zeigt der Tester zwischen den Messungen unten rechts einen Cursor an, kannst Du den Zenertest -über zweimaliges Drücken der Test-Taste beenden. Als weitere Option kannst Du -den Zenertest auch während der normalen Bauteilesuche automatisch laufen -lassen (HW_PROBE_ZENER). Wird kein Bauteil an den normalen Testpins gefunden, -prüft der Tester die Spannung an den Zener-Testpins. +über zweimaliges Drücken der Test-Taste beenden. + +Als weitere Option kannst Du den Zenertest auch während der normalen Bauteile- +suche automatisch laufen lassen (HW_PROBE_ZENER). Wird kein Bauteil an den +normalen Testpins gefunden, prüft der Tester die Spannung an den Zener-Testpins. +Diese Option steht nur zu Verfügung, sofern entweder ZENER_UNSWITCHED oder +ZENER_SWITCHED aktiviert ist. Für den Fall, dass Dein Tester einen Nicht-Standard-Spannungsteiler hat (nicht 10:1), aktiviere ZENER_DIVIDER_CUSTOM und setze die Widerstandswerte (ZENER_R1 @@ -1729,6 +1743,9 @@ Die Tr passen. Es verringert sich eigentlich nur die Reichweite, was für unseren Zweck aber kein Problem darstellt. +Ist die Summer/Pieper-Option vorhanden, kannst Du einen kurzen Bestätigungston +für gültige Daten-Pakete aktivieren (SW_IR_RX_BEEP). + - IR-Empfängermodul an Testpins @@ -2172,10 +2189,13 @@ dann verglichen. Wenn die Werte zu unterschiedlich sind, nimmt der Tester an, daß es zwei Widerstände sind und nicht nur einer. In dem Fall zeigt die Ausgabe zwei Widerstände mit gleichen Pins in der Form "1 -- 2 -- 1" mit den beiden Werten an. Für Widerstände kleiner als 10 Ohm wird eine zusätzliche -Messung mit höherer Auflösung durchgeführt. +Messung mit höherer Auflösung durchgeführt. In seltenen Fällen kann der Tester +sehr kleine Widerstände nicht erkennen. Am besten dann die Messung einfach +wiederholen. -In seltenen Fällen kann der Tester sehr kleine Widerstände nicht erkennen. Am -besten dann die Messung einfach wiederholen. +Zum Prüfen von Potentiometern bzw. Trimmern kann die zusätzliche Ausgabe vom +Gesamtwiderstand (Rt) und dem Verhältnis des ersten Widerstands zum Gesamt- +widerstand (R1) in % aktiviert werden (SW_R_TRIMMER). Wenn die optionale Prüfung auf E-Normwerte (SW_R_E*) aktiviert ist, nimmt der Tester den nächst kleineren und nächst größeren Normwert, und vergleicht @@ -2236,6 +2256,9 @@ Von meinen Tests her scheinen folgende Werte typisch f - 470-820 µF 4-7 µA - >1000 µF 5-7 µA pro 1000 µF +Wenn Du auch den Spannungsverlust in % wissen möchtest, dann aktiviere +SW_C_VLOSS (für Kondensatoren > 50nF). + Die optionale Prüfung auf E-Normwerte gibt es ebenfalls für Kondensatoren ( SW_C_E*), aber nur im Text-Modus, da es einfach zu viele unterschiedliche Farbcodes für Kondensatoren gibt. @@ -2389,7 +2412,9 @@ unterscheiden, d.h. sie k Manche TRIACs können vom Tester getriggert werden, haben aber einen zu hohen Haltestrom (I_H), wodurch sie nicht korrekt erkannt werden können. Wenn bei einem TRIAC der Triggerstom zu hoch für den Tester ist, wird er meistens -als Widerstand erkannt. +als Widerstand erkannt. Es ist auch möglich, dass der Tester einen +vermeintlichen NPN mit parasitärem BJT (NPN+) und Basis-Emitter-Widerstand +anzeigt. CLDs @@ -2433,6 +2458,20 @@ versuchen: Aktiviere NO_HFE_C_RL in config.h! +- Tester mit SCT15L104W Management-MCU: Tester schaltet sich plötzlich ab + + Problem: + Tester schaltet sich plötzlich nach der ersten Bauteilesuche ab. Wird + wahrscheinlich durch unterschiedliche Spannungspegel verursacht (SCT15L104W + hat 3,3V, der ATmega 5V) + + Betroffene Tester: + T7-H, wahrscheinlich auch andere Modelle der TC-1-Familie + + Abhilfe: + Aktiviere PASSIVE_POWER_CTRL in config.h! + + * Bekannte Probleme - Ein Speicher- bzw. Superkondensator, wie z.B. Panasonic NF Serie, wird als @@ -2605,6 +2644,12 @@ Testkommandos: - nur für Kondensator - Beispielantwort: "3.25uA" + V_l + - gibt V_loss zurück (Spannungsverlust durch Selbstentladung) + - benötigt aktivierte Ausgabe des Spannungsverlusts durch Selbstentladung + - nur für Kondensator > 4.7µF + - Beispielantwort: "1.2%" + V_F - gibt V_F zurück (forward voltage) - nur für Diode und PUT @@ -2713,10 +2758,16 @@ Testkommandos: V_Z - gibt V_Z zurück (Zener- oder externe Spannung) - - benötigt aktvierten Zener-Test während normaler Bauteilesuche + - benötigt aktivierten Zener-Test während normaler Bauteilesuche - nur für Zenerdiode oder externe Spannung (Hardware-Option) - Beispielantwort: "6750mV" + V_F_clamp + - gibt V_F der Klemmdiode zurück (forward voltage) + - nur für Schottky-Transistor + - benötigt aktivierte Erkennung von Schottky-Transistor + - Beispielantwort: "354mV" + * Hilfreiche Links diff --git a/firmware/adjust.c b/firmware/adjust.c index b0ac77c..e1198de 100644 --- a/firmware/adjust.c +++ b/firmware/adjust.c @@ -2,7 +2,7 @@ * * self-adjustment functions * - * (c) 2012-2021 by Markus Reschke + * (c) 2012-2022 by Markus Reschke * based on code from Markus Frejek and Karl-Heinz Kübbeler * * ************************************************************************ */ @@ -220,8 +220,14 @@ uint8_t DataStorage(uint8_t *Data_RAM, uint8_t *Data_EE, uint8_t Size, uint8_t M { /* tell user */ LCD_Clear(); - Display_EEString(Checksum_str); /* display: Checksum */ - Display_NL_EEString(Error_str); /* display: error! */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(2); /* center block: 2 lines */ + Display_EEString_Center(Checksum_str); /* display: Checksum */ + Display_NL_EEString_Center(Error_str); /* display: error! */ + #else + Display_EEString(Checksum_str); /* display: Checksum */ + Display_NL_EEString(Error_str); /* display: error! */ + #endif MilliSleep(2000); /* give user some time to read */ n = 0; /* signal checksum problem */ @@ -395,8 +401,14 @@ void ManageAdjustmentStorage(uint8_t Mode, uint8_t ID) { /* tell user */ LCD_Clear(); - Display_EEString(Checksum_str); /* display: Checksum */ - Display_NL_EEString(Error_str); /* display: error! */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(2); /* center block: 2 lines */ + Display_EEString_Center(Checksum_str); /* display: Checksum */ + Display_NL_EEString_Center(Error_str); /* display: error! */ + #else + Display_EEString(Checksum_str); /* display: Checksum */ + Display_NL_EEString(Error_str); /* display: error! */ + #endif MilliSleep(2000); /* give user some time to read */ SetAdjustmentDefaults(); /* set defaults */ @@ -561,7 +573,7 @@ uint8_t SelfAdjustment(void) Display_Char('A'); /* display: A (for Adjust) */ Display_Char('0' + Step); /* display number */ #ifdef UI_COLORED_TITLES - Display_UsePenColor(); /* use pen color */ + Display_UseOldColor(); /* use old color */ #endif Display_Space(); @@ -947,7 +959,7 @@ uint8_t SelfTest(void) Display_Char('T'); /* display: T */ Display_Char('0' + Test); /* display test number */ #ifdef UI_COLORED_TITLES - Display_UsePenColor(); /* use pen color */ + Display_UseOldColor(); /* use old color */ #endif Display_Space(); diff --git a/firmware/bitmaps/symbols_24x24_alt1_h.h b/firmware/bitmaps/symbols_24x24_alt1_h.h index 6e9ee2c..c2d6a3a 100644 --- a/firmware/bitmaps/symbols_24x24_alt1_h.h +++ b/firmware/bitmaps/symbols_24x24_alt1_h.h @@ -115,16 +115,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x4A,0x40,0x30,0x28,0x00,0x40,0x18,0x00,0x5B,0xFF,0xE0,0x49,0xFF,0xC0,0x30,0xFF, 0x80,0x00,0x7F,0x00,0x00,0x3E,0x00,0x00,0x1C,0x00,0x00,0x08,0x00,0x03,0xFF,0xE0, 0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x09,0x80,0x00,0x0A,0x40,0x00,0x0A,0x00,0x00, - 0x0A,0x40,0x00,0x09,0x80,0x00,0x00,0x00 /* PUT */ + 0x0A,0x40,0x00,0x09,0x80,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x00,0x00,0x38,0xC8,0x00,0x25,0x28,0x00,0x38,0x48,0x78,0x24,0x88,0x04, 0x39,0xE8,0x02,0x00,0x08,0x39,0x28,0x08,0x20,0xAF,0xF8,0x38,0x68,0x00,0x21,0xE8, 0x00,0x38,0x18,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x0F,0xF8, 0x00,0x08,0x08,0x00,0x00,0x08,0x00,0x1C,0x48,0x00,0x12,0xC8,0x00,0x1C,0x48,0x00, - 0x12,0x48,0x00,0x1C,0xE8,0x00,0x00,0x00, /* UJT n-type */ - + 0x12,0x48,0x00,0x1C,0xE8,0x00,0x00,0x00 /* UJT n-type */ + + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x3C,0x00,0x00,0xFF,0x00,0x00,0xC3,0x00,0x01,0x81,0x80,0x01,0x81,0x80,0x01,0x81, 0x80,0x00,0x03,0x00,0x00,0x07,0x00,0x00,0x0E,0x00,0x00,0x1C,0x00,0x00,0x38,0x00, @@ -178,10 +178,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_alt1_hf.h b/firmware/bitmaps/symbols_24x24_alt1_hf.h index 5a7a685..f27094f 100644 --- a/firmware/bitmaps/symbols_24x24_alt1_hf.h +++ b/firmware/bitmaps/symbols_24x24_alt1_hf.h @@ -115,16 +115,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x52,0x02,0x0C,0x14,0x00,0x02,0x18,0x00,0xDA,0xFF,0x07,0x92,0xFF,0x03,0x0C,0xFF, 0x01,0x00,0xFE,0x00,0x00,0x7C,0x00,0x00,0x38,0x00,0x00,0x10,0x00,0xC0,0xFF,0x07, 0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x90,0x01,0x00,0x50,0x02,0x00,0x50,0x00,0x00, - 0x50,0x02,0x00,0x90,0x01,0x00,0x00,0x00 /* PUT */ + 0x50,0x02,0x00,0x90,0x01,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x00,0x00,0x1C,0x13,0x00,0xA4,0x14,0x00,0x1C,0x12,0x1E,0x24,0x11,0x20, 0x9C,0x17,0x40,0x00,0x10,0x9C,0x14,0x10,0x04,0xF5,0x1F,0x1C,0x16,0x00,0x84,0x17, 0x00,0x1C,0x18,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0xF0,0x1F, 0x00,0x10,0x10,0x00,0x00,0x10,0x00,0x38,0x12,0x00,0x48,0x13,0x00,0x38,0x12,0x00, - 0x48,0x12,0x00,0x38,0x17,0x00,0x00,0x00, /* UJT n-type */ - + 0x48,0x12,0x00,0x38,0x17,0x00,0x00,0x00 /* UJT n-type */ + + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x3C,0x00,0x00,0xFF,0x00,0x00,0xC3,0x00,0x80,0x81,0x01,0x80,0x81,0x01,0x80,0x81, 0x01,0x00,0xC0,0x00,0x00,0xE0,0x00,0x00,0x70,0x00,0x00,0x38,0x00,0x00,0x1C,0x00, @@ -178,10 +178,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_alt1_vfp.h b/firmware/bitmaps/symbols_24x24_alt1_vfp.h index c1bc40f..ed379cc 100644 --- a/firmware/bitmaps/symbols_24x24_alt1_vfp.h +++ b/firmware/bitmaps/symbols_24x24_alt1_vfp.h @@ -118,16 +118,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x0A,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x01,0x00,0x00,0x81,0x83, 0x87,0x8F,0x9F,0xBF,0xFF,0xBF,0x9F,0x8F,0x87,0x83,0x81,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x38,0x44, - 0x44,0x28,0x00,0x00,0x00,0x00,0x00,0x00 /* PUT */ - - #ifdef SYMBOLS_EXTRA - , + 0x44,0x28,0x00,0x00,0x00,0x00,0x00,0x00, /* PUT */ + 0xD0,0x50,0x50,0x10,0x10,0x20,0x40,0x80,0x00,0x00,0xBE,0x2A,0xAA,0x14,0x00,0x24, 0x32,0x2A,0x24,0x00,0xFE,0x00,0x00,0x00,0x07,0x05,0x05,0x00,0x00,0x00,0x00,0x04, 0x05,0x06,0x07,0x08,0xFF,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x55,0x54,0x28,0x00, - 0x48,0x7C,0x40,0x00,0x7F,0x00,0x00,0x00, /* UJT n-type */ + 0x48,0x7C,0x40,0x00,0x7F,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x60,0x60,0x60,0x60,0xC0,0xC0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07, 0x07,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -181,10 +181,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP | PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM | PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP | PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM | PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP | PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM | PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP | PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM | PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_alt1_vp_f.h b/firmware/bitmaps/symbols_24x24_alt1_vp_f.h index 88547b6..47f8c13 100644 --- a/firmware/bitmaps/symbols_24x24_alt1_vp_f.h +++ b/firmware/bitmaps/symbols_24x24_alt1_vp_f.h @@ -118,16 +118,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x08,0x08,0x08,0x08,0x0A,0x0A,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0xC1,0xE1, 0xF1,0xF9,0xFD,0xFF,0xFD,0xF9,0xF1,0xE1,0xC1,0x81,0x00,0xC0,0xA0,0x20,0xC0,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x22,0x22,0x1C,0x00,0xFE,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* PUT */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x00,0x7F,0x00,0x24,0x54,0x4C,0x24,0x00,0x28,0x55,0x54,0x7D,0x00,0x00, 0x01,0x02,0x04,0x09,0x09,0x09,0x08,0x00,0x00,0x00,0x00,0x81,0x81,0x81,0x81,0x81, 0x81,0x81,0x81,0xFF,0x10,0xE0,0x60,0xA0,0x20,0x00,0x00,0x50,0x50,0xF0,0x00,0x00, 0x00,0x00,0x00,0xFE,0x00,0x02,0x3E,0x12,0x00,0x14,0x2A,0xAA,0x3E,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* UJT n-type */ - + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* UJT n-type */ + + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x06,0x06,0x06,0x06,0x03,0x03, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0, 0xF8,0x1C,0x0E,0x07,0x03,0x01,0x00,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -181,10 +181,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_alt2_h.h b/firmware/bitmaps/symbols_24x24_alt2_h.h index ef502f6..45c50c9 100644 --- a/firmware/bitmaps/symbols_24x24_alt2_h.h +++ b/firmware/bitmaps/symbols_24x24_alt2_h.h @@ -115,16 +115,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x4A,0x40,0x30,0x28,0x00,0x40,0x18,0x00,0x5B,0xFF,0xE0,0x49,0xFF,0xC0,0x30,0xFF, 0x80,0x00,0x7F,0x00,0x00,0x3E,0x00,0x00,0x1C,0x00,0x00,0x08,0x00,0x03,0xFF,0xE0, 0x03,0xFF,0xE0,0x00,0x08,0x00,0x00,0x09,0x80,0x00,0x0A,0x40,0x00,0x0A,0x00,0x00, - 0x0A,0x40,0x00,0x09,0x80,0x00,0x00,0x00 /* PUT */ + 0x0A,0x40,0x00,0x09,0x80,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x00,0x00,0x38,0xC8,0x00,0x25,0x28,0x00,0x38,0x48,0x00,0x24,0x88,0x7C, 0x39,0xE8,0x02,0x00,0x08,0x71,0x2C,0x08,0x40,0xEF,0xF8,0x70,0xEC,0x00,0x41,0xEC, 0x00,0x70,0x1C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0F,0xF8, 0x00,0x0C,0x08,0x00,0x00,0x08,0x00,0x1C,0x48,0x00,0x12,0xC8,0x00,0x1C,0x48,0x00, - 0x12,0x48,0x00,0x1C,0xE8,0x00,0x00,0x00, /* UJT n-type */ - + 0x12,0x48,0x00,0x1C,0xE8,0x00,0x00,0x00 /* UJT n-type */ + + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x01,0xFE,0x00,0x01,0x86,0x00,0x03, 0x33,0x00,0x03,0x43,0x40,0x03,0x43,0x40,0x00,0x06,0x40,0x00,0x0E,0x80,0x00,0x1C, 0x80,0x00,0x39,0x00,0x00,0x72,0x00,0x00,0x74,0x00,0x00,0x74,0x00,0x00,0x04,0x00, @@ -178,10 +178,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_alt2_hf.h b/firmware/bitmaps/symbols_24x24_alt2_hf.h index 9e642d1..38cd383 100644 --- a/firmware/bitmaps/symbols_24x24_alt2_hf.h +++ b/firmware/bitmaps/symbols_24x24_alt2_hf.h @@ -115,16 +115,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x52,0x02,0x0C,0x14,0x00,0x02,0x18,0x00,0xDA,0xFF,0x07,0x92,0xFF,0x03,0x0C,0xFF, 0x01,0x00,0xFE,0x00,0x00,0x7C,0x00,0x00,0x38,0x00,0x00,0x10,0x00,0xC0,0xFF,0x07, 0xC0,0xFF,0x07,0x00,0x10,0x00,0x00,0x90,0x01,0x00,0x50,0x02,0x00,0x50,0x00,0x00, - 0x50,0x02,0x00,0x90,0x01,0x00,0x00,0x00 /* PUT */ + 0x50,0x02,0x00,0x90,0x01,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x00,0x00,0x1C,0x13,0x00,0xA4,0x14,0x00,0x1C,0x12,0x00,0x24,0x11,0x3E, 0x9C,0x17,0x40,0x00,0x10,0x8E,0x34,0x10,0x02,0xF7,0x1F,0x0E,0x37,0x00,0x82,0x37, 0x00,0x0E,0x38,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0xF0,0x1F, 0x00,0x30,0x10,0x00,0x00,0x10,0x00,0x38,0x12,0x00,0x48,0x13,0x00,0x38,0x12,0x00, - 0x48,0x12,0x00,0x38,0x17,0x00,0x00,0x00, /* UJT n-type */ - + 0x48,0x12,0x00,0x38,0x17,0x00,0x00,0x00 /* UJT n-type */ + + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x00,0x80,0x7F,0x00,0x80,0x61,0x00,0xC0, 0xCC,0x00,0xC0,0xC2,0x02,0xC0,0xC2,0x02,0x00,0x60,0x02,0x00,0x70,0x01,0x00,0x38, 0x01,0x00,0x9C,0x00,0x00,0x4E,0x00,0x00,0x2E,0x00,0x00,0x2E,0x00,0x00,0x20,0x00, @@ -178,10 +178,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_alt2_vfp.h b/firmware/bitmaps/symbols_24x24_alt2_vfp.h index a45b173..ac15af2 100644 --- a/firmware/bitmaps/symbols_24x24_alt2_vfp.h +++ b/firmware/bitmaps/symbols_24x24_alt2_vfp.h @@ -118,16 +118,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x0A,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x02,0x01,0x00,0x00,0x81,0x83, 0x87,0x8F,0x9F,0xBF,0xFF,0xBF,0x9F,0x8F,0x87,0x83,0x81,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x7F,0x01,0x39,0x45, - 0x45,0x29,0x01,0x00,0x00,0x00,0x00,0x00 /* PUT */ - - #ifdef SYMBOLS_EXTRA - , + 0x45,0x29,0x01,0x00,0x00,0x00,0x00,0x00, /* PUT */ + 0xD0,0x50,0x50,0x10,0x20,0x40,0x80,0x80,0xC0,0x00,0x3E,0xAA,0xAA,0x14,0x00,0x24, 0x32,0x2A,0x24,0x00,0xFE,0x00,0x00,0x00,0x07,0x05,0x05,0x00,0x00,0x02,0x03,0x03, 0x03,0x04,0x08,0xFF,0xFF,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7D,0x55,0x54,0x28,0x00, - 0x48,0x7C,0x40,0x00,0x7F,0x00,0x00,0x00, /* UJT n-type */ + 0x48,0x7C,0x40,0x00,0x7F,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF8,0x18,0xCC,0x2C,0x2C,0x0C,0x18,0xF8, 0xE0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x70,0x78,0x7C,0x0E,0xE7,0x13,0x08,0x04,0x03,0x00,0x00,0x00,0x00,0x00, @@ -181,10 +181,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP | PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM | PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP | PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM | PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP | PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM | PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP | PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM | PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_alt2_vp_f.h b/firmware/bitmaps/symbols_24x24_alt2_vp_f.h index 71933e9..fd93ea7 100644 --- a/firmware/bitmaps/symbols_24x24_alt2_vp_f.h +++ b/firmware/bitmaps/symbols_24x24_alt2_vp_f.h @@ -118,16 +118,17 @@ const uint8_t SymbolData[] PROGMEM = { 0x08,0x08,0x08,0x08,0x0A,0x0A,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0xC1,0xE1, 0xF1,0xF9,0xFD,0xFF,0xFD,0xF9,0xF1,0xE1,0xC1,0x81,0x00,0xC0,0xA0,0x20,0xC0,0x00, 0x00,0x00,0x00,0x00,0x00,0x80,0x94,0xA2,0xA2,0x9C,0x80,0xFE,0x80,0x80,0x80,0x80, - 0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00 /* PUT */ + 0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x00,0x7F,0x00,0x24,0x54,0x4C,0x24,0x00,0x29,0x55,0x54,0x7D,0x00,0x00, 0x01,0x02,0x04,0x04,0x05,0x05,0x05,0x00,0x00,0x00,0x00,0x81,0x81,0x81,0x81,0x81, 0x81,0x81,0xFF,0xFF,0x10,0xE0,0xE0,0xE0,0x20,0x00,0x00,0x00,0x50,0x50,0xF0,0x00, 0x00,0x00,0x00,0xFE,0x00,0x02,0x3E,0x12,0x00,0x14,0xAA,0xAA,0x3E,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* UJT n-type */ - + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* UJT n-type */ + + #ifdef SYMBOLS_EXTRA + , + 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x07,0x1F,0x18,0x30,0x34,0x34,0x33,0x18, 0x1F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60, 0x10,0xC8,0xE7,0x70,0x3E,0x1E,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -181,10 +182,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_h.h b/firmware/bitmaps/symbols_24x24_h.h index 7e87ef7..295f192 100644 --- a/firmware/bitmaps/symbols_24x24_h.h +++ b/firmware/bitmaps/symbols_24x24_h.h @@ -115,16 +115,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x49,0x20,0x00,0x29,0x20,0x30,0x18,0x00,0x49,0xFF,0xC0,0x40,0xFF,0x80,0x58,0x7F, 0x00,0x48,0x3E,0x00,0x30,0x1C,0x00,0x00,0x08,0x00,0x01,0xFF,0xC0,0x01,0xFF,0xC0, 0x00,0x08,0x00,0x00,0x08,0xE0,0x00,0x09,0x00,0x00,0x09,0x00,0x00,0x09,0x00,0x00, - 0x09,0x00,0x00,0x08,0xE0,0x00,0x00,0x00 /* PUT */ + 0x09,0x00,0x00,0x08,0xE0,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x40,0x00,0x00,0x54,0x00,0x00,0x54,0x00,0x00,0x54,0x00,0x00,0x54,0x00, 0x30,0x54,0x78,0x30,0x40,0x04,0x3F,0xC0,0x02,0xB0,0x00,0x79,0xB0,0x00,0x43,0xB0, 0x00,0x40,0x70,0x00,0x70,0x30,0x00,0x40,0x30,0x00,0x40,0x30,0x00,0x78,0x3F,0xC0, 0x00,0x30,0x40,0x00,0x30,0x48,0x00,0x00,0x48,0x00,0x00,0x48,0x00,0x00,0x48,0x00, - 0x00,0x48,0x00,0x00,0x40,0x00,0x00,0x00, /* UJT n-type */ + 0x00,0x48,0x00,0x00,0x40,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x3C,0x00,0x00,0xFF,0x00,0x00,0xC3,0x00,0x01,0x81,0x80,0x01,0x81,0x80,0x01,0x81, 0x80,0x00,0x03,0x00,0x00,0x07,0x00,0x00,0x0E,0x00,0x00,0x1C,0x00,0x00,0x38,0x00, @@ -178,10 +178,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_hf.h b/firmware/bitmaps/symbols_24x24_hf.h index 2917d67..da15965 100644 --- a/firmware/bitmaps/symbols_24x24_hf.h +++ b/firmware/bitmaps/symbols_24x24_hf.h @@ -115,16 +115,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x92,0x04,0x00,0x94,0x04,0x0C,0x18,0x00,0x92,0xFF,0x03,0x02,0xFF,0x01,0x1A,0xFE, 0x00,0x12,0x7C,0x00,0x0C,0x38,0x00,0x00,0x10,0x00,0x80,0xFF,0x03,0x80,0xFF,0x03, 0x00,0x10,0x00,0x00,0x10,0x07,0x00,0x90,0x00,0x00,0x90,0x00,0x00,0x90,0x00,0x00, - 0x90,0x00,0x00,0x10,0x07,0x00,0x00,0x00 /* PUT */ + 0x90,0x00,0x00,0x10,0x07,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x02,0x00,0x00,0x2A,0x00,0x00,0x2A,0x00,0x00,0x2A,0x00,0x00,0x2A,0x00, 0x0C,0x2A,0x1E,0x0C,0x02,0x20,0xFC,0x03,0x40,0x0D,0x00,0x9E,0x0D,0x00,0xC2,0x0D, 0x00,0x02,0x0E,0x00,0x0E,0x0C,0x00,0x02,0x0C,0x00,0x02,0x0C,0x00,0x1E,0xFC,0x03, 0x00,0x0C,0x02,0x00,0x0C,0x12,0x00,0x00,0x12,0x00,0x00,0x12,0x00,0x00,0x12,0x00, - 0x00,0x12,0x00,0x00,0x02,0x00,0x00,0x00, /* UJT n-type */ + 0x00,0x12,0x00,0x00,0x02,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x3C,0x00,0x00,0xFF,0x00,0x00,0xC3,0x00,0x80,0x81,0x01,0x80,0x81,0x01,0x80,0x81, 0x01,0x00,0xC0,0x00,0x00,0xE0,0x00,0x00,0x70,0x00,0x00,0x38,0x00,0x00,0x1C,0x00, @@ -178,10 +178,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_old_h.h b/firmware/bitmaps/symbols_24x24_old_h.h index 84570c6..182cfb6 100644 --- a/firmware/bitmaps/symbols_24x24_old_h.h +++ b/firmware/bitmaps/symbols_24x24_old_h.h @@ -115,16 +115,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x48,0x00,0x00,0x28,0x00,0x00,0x18,0x00,0x01,0xFF,0xC0,0x00,0xFF,0x80,0x00,0xFF, 0x80,0x00,0x7F,0x00,0x00,0x7F,0x00,0x00,0x3E,0x00,0x00,0x3E,0x00,0x00,0x1C,0x00, 0x00,0x1C,0x00,0x00,0x08,0x00,0x01,0xFF,0xC0,0x00,0x08,0x00,0x00,0x08,0x00,0x00, - 0x08,0x00,0x00,0x08,0x00,0x00,0x00,0x00 /* PUT */ + 0x08,0x00,0x00,0x08,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x40,0x00,0x00,0x40,0x00,0x3E,0x40,0x00,0xC1,0xC0,0x03,0x00,0x60,0x04, 0x10,0x50,0xFC,0x10,0x50,0x0A,0x1F,0xC8,0x09,0x50,0x08,0x10,0xD0,0x04,0x11,0xD0, 0x04,0x10,0x30,0x04,0x10,0x10,0x04,0x10,0x10,0x04,0x08,0x10,0x08,0x08,0x1F,0xC8, 0x04,0x10,0x50,0x04,0x10,0x50,0x03,0x00,0x60,0x00,0xC1,0xC0,0x00,0x3E,0x40,0x00, - 0x00,0x40,0x00,0x00,0x40,0x00,0x00,0x00, /* UJT n-type */ + 0x00,0x40,0x00,0x00,0x40,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x3C,0x00,0x00,0xFF,0x00,0x00,0xC3,0x00,0x01,0x81,0x80,0x01,0x81,0x80,0x01,0x81, 0x80,0x00,0x03,0x00,0x00,0x07,0x00,0x00,0x0E,0x00,0x00,0x1C,0x00,0x00,0x38,0x00, @@ -178,10 +178,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_old_hf.h b/firmware/bitmaps/symbols_24x24_old_hf.h index 68cb5ef..925d834 100644 --- a/firmware/bitmaps/symbols_24x24_old_hf.h +++ b/firmware/bitmaps/symbols_24x24_old_hf.h @@ -115,16 +115,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x12,0x00,0x00,0x14,0x00,0x00,0x18,0x00,0x80,0xFF,0x03,0x00,0xFF,0x01,0x00,0xFF, 0x01,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x7C,0x00,0x00,0x7C,0x00,0x00,0x38,0x00, 0x00,0x38,0x00,0x00,0x10,0x00,0x80,0xFF,0x03,0x00,0x10,0x00,0x00,0x10,0x00,0x00, - 0x10,0x00,0x00,0x10,0x00,0x00,0x00,0x00 /* PUT */ + 0x10,0x00,0x00,0x10,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x02,0x00,0x00,0x02,0x00,0x7C,0x02,0x00,0x83,0x03,0xC0,0x00,0x06,0x20, 0x08,0x0A,0x3F,0x08,0x0A,0x50,0xF8,0x13,0x90,0x0A,0x10,0x08,0x0B,0x20,0x88,0x0B, 0x20,0x08,0x0C,0x20,0x08,0x08,0x20,0x08,0x08,0x20,0x10,0x08,0x10,0x10,0xF8,0x13, 0x20,0x08,0x0A,0x20,0x08,0x0A,0xC0,0x00,0x06,0x00,0x83,0x03,0x00,0x7C,0x02,0x00, - 0x00,0x02,0x00,0x00,0x02,0x00,0x00,0x00, /* UJT n-type */ + 0x00,0x02,0x00,0x00,0x02,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x3C,0x00,0x00,0xFF,0x00,0x00,0xC3,0x00,0x80,0x81,0x01,0x80,0x81,0x01,0x80,0x81, 0x01,0x00,0xC0,0x00,0x00,0xE0,0x00,0x00,0x70,0x00,0x00,0x38,0x00,0x00,0x1C,0x00, @@ -178,10 +178,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_old_vfp.h b/firmware/bitmaps/symbols_24x24_old_vfp.h index cad5e75..d767bb5 100644 --- a/firmware/bitmaps/symbols_24x24_old_vfp.h +++ b/firmware/bitmaps/symbols_24x24_old_vfp.h @@ -112,22 +112,22 @@ const uint8_t SymbolData[] PROGMEM = { 0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xF8,0xFE,0xFF, 0xFE,0xF8,0xE0,0x80,0x00,0x01,0x07,0x1F,0x7F,0xFF,0x7F,0x1F,0x07,0x01,0x00,0x00, 0x10,0x10,0x10,0x11,0x11,0x09,0x05,0x03,0x01,0x01,0x01,0x01,0xFF,0x01,0x01,0x01, - 0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00, /* Triac */ + 0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00, /* Triac */ 0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x40,0x80,0xFE,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x07,0x1F,0x7F,0xFF,0xFF,0xFF,0x7F,0x1F,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x05,0x7F,0x05,0x04,0x04, - 0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00 /* PUT */ + 0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x40,0x40,0x40,0x40,0xC0,0x60,0x90,0x10,0x08,0x08,0x04,0xE4,0x84,0x84,0x84,0x88, 0x88,0xFF,0x10,0x60,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0xC1,0x00,0x00,0x05, 0x06,0x07,0x08,0xFF,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0xC1,0x3E,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x08,0x08,0x10,0x13,0x10,0x10,0x10,0x08, - 0x08,0x7F,0x04,0x03,0x00,0x00,0x00,0x00, /* UJT n-type */ + 0x08,0x7F,0x04,0x03,0x00,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x60,0x60,0x60,0x60,0xC0,0xC0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07, 0x07,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -181,13 +181,13 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ - PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ - PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ + PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ + PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ #endif }; diff --git a/firmware/bitmaps/symbols_24x24_old_vp_f.h b/firmware/bitmaps/symbols_24x24_old_vp_f.h index 44220c0..791532c 100644 --- a/firmware/bitmaps/symbols_24x24_old_vp_f.h +++ b/firmware/bitmaps/symbols_24x24_old_vp_f.h @@ -118,16 +118,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0, 0xF8,0xFE,0xFF,0xFF,0xFF,0xFE,0xF8,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x20,0xA0,0xFE,0xA0,0x20,0x20,0x20, - 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* PUT */ + 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x00,0x01,0x06,0x08,0xFF,0x11,0x11,0x21,0x21,0x21,0x27,0x20,0x10,0x10, 0x08,0x09,0x06,0x03,0x02,0x02,0x02,0x02,0x00,0x00,0x7C,0x83,0x00,0x00,0x01,0x01, 0x01,0x01,0x01,0x01,0xFF,0x10,0xE0,0x60,0xA0,0x00,0x00,0x83,0x7C,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0xC0,0x20,0xFE,0x10,0x10,0x08,0x08,0x08,0xC8,0x08,0x10,0x10, - 0x20,0x20,0xC0,0x00,0x00,0x00,0x00,0x00, /* UJT n-type */ + 0x20,0x20,0xC0,0x00,0x00,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x06,0x06,0x06,0x06,0x03,0x03, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0, 0xF8,0x1C,0x0E,0x07,0x03,0x01,0x00,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -181,10 +181,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_24x24_vfp.h b/firmware/bitmaps/symbols_24x24_vfp.h index 87cceec..8d801ae 100644 --- a/firmware/bitmaps/symbols_24x24_vfp.h +++ b/firmware/bitmaps/symbols_24x24_vfp.h @@ -118,16 +118,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x12,0x12,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x10,0x14,0x0D,0x00,0x00,0xC1, 0xC3,0xC7,0xCF,0xDF,0xFF,0xDF,0xCF,0xC7,0xC3,0xC1,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x3C, - 0x42,0x42,0x42,0x00,0x00,0x00,0x00,0x00 /* PUT */ + 0x42,0x42,0x42,0x00,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x40,0x40,0x40,0x40,0x80,0x00,0x00,0x00,0x00,0xE0,0xE0,0x80,0x80,0x80,0x80, 0x80,0xFF,0x00,0x3E,0x00,0x3E,0x00,0x00,0x00,0xFE,0x92,0x92,0x82,0x00,0x05,0x06, 0x07,0x08,0xFF,0xFF,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x00,0x00, - 0x00,0x7F,0x00,0x00,0x3E,0x00,0x00,0x00, /* UJT n-type */ + 0x00,0x7F,0x00,0x00,0x3E,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x60,0x60,0x60,0x60,0xC0,0xC0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07, 0x07,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -181,13 +181,13 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ - PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ - PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ + PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ + PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ #endif }; diff --git a/firmware/bitmaps/symbols_24x24_vp_f.h b/firmware/bitmaps/symbols_24x24_vp_f.h index 6a49551..e1483b6 100644 --- a/firmware/bitmaps/symbols_24x24_vp_f.h +++ b/firmware/bitmaps/symbols_24x24_vp_f.h @@ -118,16 +118,16 @@ const uint8_t SymbolData[] PROGMEM = { 0x08,0x08,0x08,0x08,0x09,0x09,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0xC3, 0xE3,0xF3,0xFB,0xFF,0xFB,0xF3,0xE3,0xC3,0x83,0x00,0x00,0xB0,0x28,0x08,0xF0,0x00, 0x00,0x00,0x00,0x00,0x00,0x42,0x42,0x42,0x3C,0x00,0x00,0xFE,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* PUT */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x7C,0x00,0x7C,0x00,0xFF,0x01,0x01,0x01,0x01,0x01,0x07,0x07,0x00,0x00, 0x00,0x00,0x01,0x02,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01, 0x01,0x01,0x01,0x01,0xFF,0xFF,0x10,0xE0,0x60,0xA0,0x00,0x41,0x49,0x49,0x7F,0x00, 0x00,0x00,0x00,0x7C,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* UJT n-type */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x06,0x06,0x06,0x06,0x03,0x03, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0, 0xF8,0x1C,0x0E,0x07,0x03,0x01,0x00,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -138,7 +138,7 @@ const uint8_t SymbolData[] PROGMEM = { 0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE1,0x83,0x87, 0x8F,0x9F,0xBF,0xFF,0xBF,0x9F,0x8F,0x87,0x83,0x81,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x28,0x28,0x1E,0x00,0xFE,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* Zener diode */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* Zener diode */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x3C,0xBD,0xBD, @@ -181,10 +181,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_30x32_alt1_hf.h b/firmware/bitmaps/symbols_30x32_alt1_hf.h index 3ebda19..bc3ca10 100644 --- a/firmware/bitmaps/symbols_30x32_alt1_hf.h +++ b/firmware/bitmaps/symbols_30x32_alt1_hf.h @@ -154,10 +154,8 @@ const uint8_t SymbolData[] PROGMEM = { 0x00,0x00,0x7F,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x08,0x00, 0x00,0xFC,0xFF,0x1F,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00, 0x00,0x00,0x88,0x03,0x00,0x00,0x48,0x04,0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x00, - 0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x04,0x00,0x00,0x88,0x03,0x00,0x00,0x00,0x00 /* PUT */ - - #ifdef SYMBOLS_EXTRA - , + 0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x04,0x00,0x00,0x88,0x03,0x00,0x00,0x00,0x00, /* PUT */ + 0x00,0x00,0x1E,0x13,0x00,0x00,0xA2,0x14,0x00,0x00,0x22,0x14,0x00,0x00,0x1E,0x12, 0x00,0x00,0x22,0x11,0x00,0x00,0xA2,0x10,0x3E,0x80,0x9E,0x17,0x40,0x80,0x00,0x10, 0x80,0x80,0xFF,0x1F,0x00,0x91,0x00,0x00,0x3E,0x92,0x00,0x00,0x02,0x94,0x00,0x00, @@ -165,8 +163,10 @@ const uint8_t SymbolData[] PROGMEM = { 0x3E,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00, 0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0xFF,0x1F,0x00,0x80,0x00,0x10, 0x00,0x80,0x1E,0x11,0x00,0x00,0xA2,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x1E,0x11, - 0x00,0x00,0x22,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x9E,0x13,0x00,0x00,0x00,0x00, /* UJT n-type */ - + 0x00,0x00,0x22,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x9E,0x13,0x00,0x00,0x00,0x00 /* UJT n-type */ + + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0x00, 0x00,0xFC,0x07,0x00,0x00,0xFE,0x0F,0x00,0x00,0x0F,0x1E,0x00,0x00,0x07,0x1C,0x00, 0x80,0x03,0x38,0x00,0x80,0x03,0x38,0x00,0x80,0x03,0x38,0x00,0x00,0x00,0x38,0x00, @@ -229,10 +229,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_30x32_alt2_hf.h b/firmware/bitmaps/symbols_30x32_alt2_hf.h index bd20dc2..ef5bd45 100644 --- a/firmware/bitmaps/symbols_30x32_alt2_hf.h +++ b/firmware/bitmaps/symbols_30x32_alt2_hf.h @@ -154,10 +154,8 @@ const uint8_t SymbolData[] PROGMEM = { 0x00,0x00,0x7F,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x08,0x00, 0x00,0xFC,0xFF,0x1F,0x00,0xFC,0xFF,0x1F,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00, 0x00,0x00,0x88,0x03,0x00,0x00,0x48,0x04,0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x00, - 0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x04,0x00,0x00,0x88,0x03,0x00,0x00,0x00,0x00 /* PUT */ - - #ifdef SYMBOLS_EXTRA - , + 0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x04,0x00,0x00,0x88,0x03,0x00,0x00,0x00,0x00, /* PUT */ + 0x00,0x00,0x1E,0x13,0x00,0x00,0xA2,0x14,0x00,0x00,0x22,0x14,0x00,0x00,0x1E,0x12, 0x00,0x00,0x22,0x11,0x00,0x00,0xA2,0x10,0x1E,0xC0,0x9E,0x17,0x20,0xC0,0x00,0x10, 0x40,0xC0,0xFF,0x1F,0x80,0xC8,0x00,0x00,0x3E,0xCD,0x00,0x00,0x02,0xCE,0x00,0x00, @@ -165,8 +163,10 @@ const uint8_t SymbolData[] PROGMEM = { 0x3E,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00, 0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0xFF,0x1F,0x00,0xC0,0x00,0x10, 0x00,0xC0,0x1E,0x11,0x00,0x00,0xA2,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x1E,0x11, - 0x00,0x00,0x22,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x9E,0x13,0x00,0x00,0x00,0x00, /* UJT n-type */ - + 0x00,0x00,0x22,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x9E,0x13,0x00,0x00,0x00,0x00 /* UJT n-type */ + + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0xFE,0x03,0x00,0x00,0xFF,0x07,0x00, 0x80,0x07,0x0F,0x00,0x80,0x73,0x0E,0x00,0xC0,0x09,0x1C,0x00,0xC0,0x05,0x5C,0x00, 0xC0,0x05,0x5C,0x00,0x00,0x00,0x5C,0x00,0x00,0x00,0x4E,0x00,0x00,0x00,0x2F,0x00, @@ -229,10 +229,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_30x32_hf.h b/firmware/bitmaps/symbols_30x32_hf.h index d62e1d8..fc8e21c 100644 --- a/firmware/bitmaps/symbols_30x32_hf.h +++ b/firmware/bitmaps/symbols_30x32_hf.h @@ -154,10 +154,8 @@ const uint8_t SymbolData[] PROGMEM = { 0x00,0xC0,0x07,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0xFF,0xFF,0x01, 0x00,0xFF,0xFF,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xE1,0x00, 0x00,0x00,0x11,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x09,0x00, - 0x00,0x00,0x09,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x00,0x00 /* PUT */ + 0x00,0x00,0x09,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x10,0x00,0x00,0x00,0x90,0x04,0x00,0x00,0x90,0x04,0x00,0x00,0x90,0x04, 0x00,0x00,0x90,0x04,0x00,0x00,0x90,0x04,0x00,0x30,0x90,0x04,0x00,0x30,0x90,0x04, 0x3E,0x30,0x10,0x00,0x40,0xF2,0x1F,0x00,0x80,0x33,0x00,0x00,0x80,0x33,0x00,0x00, @@ -165,8 +163,10 @@ const uint8_t SymbolData[] PROGMEM = { 0x02,0x30,0x00,0x00,0x02,0x30,0x00,0x00,0x1E,0x30,0x00,0x00,0x02,0x30,0x00,0x00, 0x02,0x30,0x00,0x00,0x02,0xF0,0x1F,0x00,0x3E,0x30,0x10,0x00,0x00,0x30,0x10,0x01, 0x00,0x30,0x10,0x01,0x00,0x00,0x10,0x01,0x00,0x00,0x10,0x01,0x00,0x00,0x10,0x01, - 0x00,0x00,0x10,0x01,0x00,0x00,0x10,0x01,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00, /* UJT n-type */ + 0x00,0x00,0x10,0x01,0x00,0x00,0x10,0x01,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0x00, 0x00,0xFC,0x07,0x00,0x00,0xFE,0x0F,0x00,0x00,0x0F,0x1E,0x00,0x00,0x07,0x1C,0x00, 0x80,0x03,0x38,0x00,0x80,0x03,0x38,0x00,0x80,0x03,0x38,0x00,0x00,0x00,0x38,0x00, @@ -229,10 +229,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_30x32_old_hf.h b/firmware/bitmaps/symbols_30x32_old_hf.h index 94f5a17..c92578e 100644 --- a/firmware/bitmaps/symbols_30x32_old_hf.h +++ b/firmware/bitmaps/symbols_30x32_old_hf.h @@ -154,10 +154,8 @@ const uint8_t SymbolData[] PROGMEM = { 0x00,0xFC,0x1F,0x00,0x00,0xF8,0x0F,0x00,0x00,0xF0,0x07,0x00,0x00,0xE0,0x03,0x00, 0x00,0xC0,0x01,0x00,0x00,0x80,0x00,0x00,0xC0,0xFF,0xFF,0x01,0x00,0x80,0x00,0x00, 0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00, - 0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00 /* PUT */ + 0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0xE0,0x13,0x00,0x00,0x1C,0x1C,0x00, 0x00,0x03,0x70,0x00,0x80,0x00,0x90,0x00,0x40,0x00,0x10,0x01,0x20,0x10,0x10,0x02, 0x3F,0x10,0x10,0x04,0x50,0xF0,0x1F,0x04,0x88,0x12,0x00,0x08,0x08,0x13,0x00,0x08, @@ -165,8 +163,10 @@ const uint8_t SymbolData[] PROGMEM = { 0x04,0x10,0x00,0x10,0x04,0x10,0x00,0x10,0x08,0x10,0x00,0x08,0x08,0x10,0x00,0x08, 0x08,0x10,0x00,0x08,0x10,0xF0,0x1F,0x04,0x10,0x10,0x10,0x04,0x20,0x10,0x10,0x02, 0x40,0x00,0x10,0x01,0x80,0x00,0x90,0x00,0x00,0x03,0x70,0x00,0x00,0x1C,0x1C,0x00, - 0x00,0xE0,0x13,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00, /* UJT n-type */ + 0x00,0xE0,0x13,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0x00, 0x00,0xFC,0x07,0x00,0x00,0xFE,0x0F,0x00,0x00,0x0F,0x1E,0x00,0x00,0x07,0x1C,0x00, 0x80,0x03,0x38,0x00,0x80,0x03,0x38,0x00,0x80,0x03,0x38,0x00,0x00,0x00,0x38,0x00, @@ -229,10 +229,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_32x32_alt1_hf.h b/firmware/bitmaps/symbols_32x32_alt1_hf.h index 51cba2b..680674a 100644 --- a/firmware/bitmaps/symbols_32x32_alt1_hf.h +++ b/firmware/bitmaps/symbols_32x32_alt1_hf.h @@ -154,10 +154,8 @@ const uint8_t SymbolData[] PROGMEM = { 0x00,0x00,0x7F,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x08,0x00, 0x00,0xFC,0xFF,0x1F,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00, 0x00,0x00,0x88,0x03,0x00,0x00,0x48,0x04,0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x00, - 0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x04,0x00,0x00,0x88,0x03,0x00,0x00,0x00,0x00 /* PUT */ - - #ifdef SYMBOLS_EXTRA - , + 0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x04,0x00,0x00,0x88,0x03,0x00,0x00,0x00,0x00, /* PUT */ + 0x00,0x00,0x1E,0x13,0x00,0x00,0xA2,0x14,0x00,0x00,0x22,0x14,0x00,0x00,0x1E,0x12, 0x00,0x00,0x22,0x11,0x00,0x00,0xA2,0x10,0x3E,0x00,0x9E,0x17,0x40,0x80,0x00,0x10, 0x80,0x80,0x00,0x10,0x00,0x91,0xFF,0x1F,0x7C,0x92,0x00,0x00,0x04,0x94,0x00,0x00, @@ -165,8 +163,10 @@ const uint8_t SymbolData[] PROGMEM = { 0x7C,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x00, 0x00,0x80,0x00,0x00,0x00,0x80,0xFF,0x1F,0x00,0x80,0x00,0x10,0x00,0x80,0x00,0x10, 0x00,0x00,0x1E,0x11,0x00,0x00,0xA2,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x1E,0x11, - 0x00,0x00,0x22,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x9E,0x13,0x00,0x00,0x00,0x00, /* UJT n-type */ - + 0x00,0x00,0x22,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x9E,0x13,0x00,0x00,0x00,0x00 /* UJT n-type */ + + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0x00,0x00,0xFC,0x07,0x00, 0x00,0xFE,0x0F,0x00,0x00,0x0F,0x1E,0x00,0x00,0x07,0x1C,0x00,0x80,0x03,0x38,0x00, 0x80,0x03,0x38,0x00,0x80,0x03,0x38,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x1C,0x00, @@ -229,10 +229,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_32x32_alt2_hf.h b/firmware/bitmaps/symbols_32x32_alt2_hf.h index b960de1..e68058b 100644 --- a/firmware/bitmaps/symbols_32x32_alt2_hf.h +++ b/firmware/bitmaps/symbols_32x32_alt2_hf.h @@ -154,10 +154,8 @@ const uint8_t SymbolData[] PROGMEM = { 0x00,0x00,0x7F,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x08,0x00, 0x00,0xFC,0xFF,0x1F,0x00,0xFC,0xFF,0x1F,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00, 0x00,0x00,0x88,0x03,0x00,0x00,0x48,0x04,0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x00, - 0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x04,0x00,0x00,0x88,0x03,0x00,0x00,0x00,0x00 /* PUT */ - - #ifdef SYMBOLS_EXTRA - , + 0x00,0x00,0x48,0x00,0x00,0x00,0x48,0x04,0x00,0x00,0x88,0x03,0x00,0x00,0x00,0x00, /* PUT */ + 0x00,0x00,0x1E,0x13,0x00,0x00,0xA2,0x14,0x00,0x00,0x22,0x14,0x00,0x00,0x1E,0x12, 0x00,0x00,0x22,0x11,0x00,0x00,0xA2,0x10,0x1E,0x00,0x9E,0x17,0x20,0xC0,0x00,0x10, 0x40,0xC0,0x00,0x10,0x80,0xC8,0xFF,0x1F,0x3E,0xCD,0x00,0x00,0x02,0xCE,0x00,0x00, @@ -165,8 +163,10 @@ const uint8_t SymbolData[] PROGMEM = { 0x3E,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00, 0x00,0xC0,0x00,0x00,0x00,0xC0,0xFF,0x1F,0x00,0xC0,0x00,0x10,0x00,0xC0,0x00,0x10, 0x00,0x00,0x1E,0x11,0x00,0x00,0xA2,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x1E,0x11, - 0x00,0x00,0x22,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x9E,0x13,0x00,0x00,0x00,0x00, /* UJT n-type */ - + 0x00,0x00,0x22,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x9E,0x13,0x00,0x00,0x00,0x00 /* UJT n-type */ + + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0x00,0x00,0xFC,0x07,0x00,0x00,0xFE,0x0F,0x00, 0x00,0x0F,0x1E,0x00,0x00,0xE7,0x1C,0x00,0x80,0x13,0x38,0x00,0x80,0x0B,0xB8,0x00, 0x80,0x0B,0xB8,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x9C,0x00,0x00,0x00,0x5E,0x00, @@ -229,10 +229,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_32x32_hf.h b/firmware/bitmaps/symbols_32x32_hf.h index 82086d7..10e1399 100644 --- a/firmware/bitmaps/symbols_32x32_hf.h +++ b/firmware/bitmaps/symbols_32x32_hf.h @@ -154,10 +154,8 @@ const uint8_t SymbolData[] PROGMEM = { 0x00,0xC0,0x07,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0xFF,0xFF,0x01, 0x00,0xFF,0xFF,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xE1,0x00, 0x00,0x00,0x11,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x09,0x00, - 0x00,0x00,0x09,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x00,0x00 /* PUT */ + 0x00,0x00,0x09,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0xE1,0x00,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x09,0x00,0x00,0x20,0x09,0x00,0x00,0x20,0x09, 0x00,0x00,0x20,0x09,0x00,0x00,0x20,0x09,0x00,0x60,0x20,0x09,0x00,0x60,0x20,0x09, 0x3E,0x60,0x20,0x00,0x40,0xE0,0x3F,0x00,0x80,0x64,0x00,0x00,0x00,0x67,0x00,0x00, @@ -165,8 +163,10 @@ const uint8_t SymbolData[] PROGMEM = { 0x1E,0x60,0x00,0x00,0x02,0x60,0x00,0x00,0x02,0x60,0x00,0x00,0x02,0x60,0x00,0x00, 0x3E,0x60,0x00,0x00,0x00,0xE0,0x3F,0x00,0x00,0x60,0x20,0x02,0x00,0x60,0x20,0x02, 0x00,0x60,0x20,0x02,0x00,0x00,0x20,0x02,0x00,0x00,0x20,0x02,0x00,0x00,0x20,0x02, - 0x00,0x00,0x20,0x02,0x00,0x00,0x20,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00, /* UJT n-type */ + 0x00,0x00,0x20,0x02,0x00,0x00,0x20,0x02,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0x00, 0x00,0xFC,0x07,0x00,0x00,0xFE,0x0F,0x00,0x00,0x0F,0x1E,0x00,0x00,0x07,0x1C,0x00, 0x80,0x03,0x38,0x00,0x80,0x03,0x38,0x00,0x80,0x03,0x38,0x00,0x00,0x00,0x38,0x00, @@ -229,10 +229,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_32x32_old_hf.h b/firmware/bitmaps/symbols_32x32_old_hf.h index 9efdb24..2e11169 100644 --- a/firmware/bitmaps/symbols_32x32_old_hf.h +++ b/firmware/bitmaps/symbols_32x32_old_hf.h @@ -154,10 +154,8 @@ const uint8_t SymbolData[] PROGMEM = { 0x00,0xF8,0x3F,0x00,0x00,0xF0,0x1F,0x00,0x00,0xE0,0x0F,0x00,0x00,0xC0,0x07,0x00, 0x00,0x80,0x03,0x00,0x00,0x00,0x01,0x00,0x80,0xFF,0xFF,0x03,0x00,0x00,0x01,0x00, 0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00, - 0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00 /* PUT */ + 0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, /* PUT */ - #ifdef SYMBOLS_EXTRA - , 0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x00,0x00,0xC0,0x27,0x00,0x00,0x38,0x38,0x00, 0x00,0x06,0xE0,0x00,0x00,0x01,0x20,0x01,0x80,0x00,0x20,0x02,0x40,0x20,0x20,0x04, 0x7F,0x20,0x20,0x08,0xA0,0xE0,0x3F,0x08,0x10,0x25,0x00,0x10,0x10,0x26,0x00,0x10, @@ -165,8 +163,10 @@ const uint8_t SymbolData[] PROGMEM = { 0x08,0x20,0x00,0x20,0x08,0x20,0x00,0x20,0x10,0x20,0x00,0x10,0x10,0x20,0x00,0x10, 0x10,0x20,0x00,0x10,0x20,0xE0,0x3F,0x08,0x20,0x20,0x20,0x08,0x40,0x20,0x20,0x04, 0x80,0x00,0x20,0x02,0x00,0x01,0x20,0x01,0x00,0x06,0xE0,0x00,0x00,0x38,0x38,0x00, - 0x00,0xC0,0x27,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00. /* UJT n-type */ + 0x00,0xC0,0x27,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0x00, 0x00,0xFC,0x07,0x00,0x00,0xFE,0x0F,0x00,0x00,0x0F,0x1E,0x00,0x00,0x07,0x1C,0x00, 0x80,0x03,0x38,0x00,0x80,0x03,0x38,0x00,0x80,0x03,0x38,0x00,0x00,0x00,0x38,0x00, @@ -229,10 +229,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* Triac */ - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/bitmaps/symbols_32x39_hf.h b/firmware/bitmaps/symbols_32x39_hf.h index 08442ae..3c7e40b 100644 --- a/firmware/bitmaps/symbols_32x39_hf.h +++ b/firmware/bitmaps/symbols_32x39_hf.h @@ -180,10 +180,8 @@ const uint8_t SymbolData[] PROGMEM = { 0x00,0xFC,0xFF,0x7F,0x00,0xFC,0xFF,0x7F,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00, 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x07,0x00,0x00,0x90,0x08, 0x00,0x00,0x90,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x90,0x08, - 0x00,0x00,0x10,0x07,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00 /* PUT */ - - #ifdef SYMBOLS_EXTRA - , + 0x00,0x00,0x10,0x07,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00, /* PUT */ + 0x00,0x00,0x00,0x10,0x00,0x00,0x8F,0x11,0x00,0x00,0x51,0x12,0x00,0x00,0x11,0x12, 0x00,0x00,0x0F,0x11,0x00,0x00,0x91,0x10,0x1E,0x00,0x51,0x10,0x20,0x00,0xCF,0x13, 0x40,0x00,0x00,0x10,0x80,0xC8,0x00,0x10,0x00,0xCD,0x00,0x10,0x3E,0xCE,0xFF,0x1F, @@ -193,8 +191,10 @@ const uint8_t SymbolData[] PROGMEM = { 0x00,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0xC0,0xFF,0x1F,0x00,0xC0,0x00,0x10, 0x00,0xC0,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x1E,0x11,0x00,0x00,0xA2,0x11, 0x00,0x00,0x22,0x11,0x00,0x00,0x1E,0x11,0x00,0x00,0x22,0x11,0x00,0x00,0x22,0x11, - 0x00,0x00,0x9E,0x13,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00, /* UJT n-type */ + 0x00,0x00,0x9E,0x13,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00 /* UJT n-type */ + #ifdef SYMBOLS_EXTRA + , 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x01,0x00, 0x80,0xFF,0x07,0x00,0xC0,0xFF,0x0F,0x00,0xE0,0xFF,0x1F,0x00,0xF0,0x01,0x3E,0x00, 0xF0,0xFC,0x3C,0x00,0x78,0x02,0x78,0x00,0x78,0x01,0x78,0x01,0x78,0x01,0x78,0x01, @@ -263,10 +263,10 @@ const uint8_t PinTable[] PROGMEM = { PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP, /* IGBT enh p-ch */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* SCR */ PIN_LEFT | PIN_BOTTOM, PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* Triac */ - PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER /* PUT */ + PIN_LEFT | PIN_TOP,PIN_RIGHT | PIN_TOP| PIN_ALT_CENTER, PIN_RIGHT | PIN_BOTTOM| PIN_ALT_CENTER, /* PUT */ + PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM /* UJT n-type */ #ifdef SYMBOLS_EXTRA , - PIN_LEFT | PIN_TOP, PIN_RIGHT | PIN_TOP, PIN_RIGHT | PIN_BOTTOM, /* UJT n-type */ PIN_NONE, PIN_NONE, PIN_NONE, /* question mark */ PIN_NONE, PIN_NONE, PIN_NONE, /* Zener diode */ PIN_NONE, PIN_NONE, PIN_NONE /* quartz crystal */ diff --git a/firmware/cap.c b/firmware/cap.c index abcf102..08d0164 100644 --- a/firmware/cap.c +++ b/firmware/cap.c @@ -2,7 +2,7 @@ * * capacitor measurements * - * (c) 2012-2020 by Markus Reschke + * (c) 2012-2022 by Markus Reschke * based on code from Markus Frejek and Karl-Heinz Kübbeler * * ************************************************************************ */ @@ -991,15 +991,26 @@ uint8_t LargeCap(Capacitor_Type *Cap) TempInt = Pulses; while (TempInt > 0) { - TempInt--; /* descrease timeout */ + TempInt--; /* decrease timeout */ U_Drop = ReadU(Probes.Ch_1); /* get voltage */ - U_Drop -= U_Zero; /* zero offset */ + U_Drop -= U_Zero; /* subtract zero offset */ wdt_reset(); /* reset watchdog */ } /* calculate voltage drop */ - if (U_Cap > U_Drop) U_Drop = U_Cap - U_Drop; - else U_Drop = 0; + if (U_Cap > U_Drop) /* sanity check */ + { + U_Drop = U_Cap - U_Drop; /* voltage drop */ + + #ifdef SW_C_VLOSS + /* voltage loss in 0.1% */ + Cap->U_loss = (uint16_t)((unsigned long)(U_Drop * 1000UL) / U_Cap); + #endif + } + else /* bad values */ + { + U_Drop = 0; /* zero drop */ + } /* if voltage drop is too large, consider DUT not to be a cap */ if (U_Drop > 100) Flag = 0; @@ -1026,7 +1037,20 @@ uint8_t LargeCap(Capacitor_Type *Cap) /* calculate voltage drop */ if (U_Zero > TempInt) /* sanity check */ { + #if 0 + /* SW_C_VLOSS alternative */ + uint16_t U_Temp; /* temp. value */ + + U_Temp = U_Zero; /* save voltage */ + #endif + U_Zero -= TempInt; /* voltage drop */ + + #if 0 + /* SW_C_VLOSS alternative */ + /* voltage loss in 0.1% */ + Cap->U_loss = (unsigned long)(U_Zero * 1000UL) / U_Temp; + #endif } else /* no drop */ { @@ -1103,8 +1127,14 @@ uint8_t LargeCap(Capacitor_Type *Cap) } /* long pulses: / 1s */ - Raw = RescaleValue(Value, Scale, -8); /* rescale to 10nA */ - Cap->I_leak = Raw; /* leakage current (in 10nA) */ + while (Value > UINT16_MAX) /* scale to uint16_t */ + { + Value /= 10; + Scale++; + } + + Cap->I_leak_Value = (uint16_t)Value; /* save result */ + Cap->I_leak_Scale = Scale; } return Flag; @@ -1266,7 +1296,7 @@ uint8_t SmallCap(Capacitor_Type *Cap) * - use factor from pre-calculated SmallCap_table */ - if (Flag == 3) + if (Flag == 3) /* measurement successful */ { /* combine both counter values */ Raw = (uint32_t)Ticks; /* set lower 16 bits */ @@ -1332,12 +1362,11 @@ uint8_t SmallCap(Capacitor_Type *Cap) #ifndef HW_ADJUST_CAP - /* * Self-adjust the voltage offset of the analog comparator and internal * bandgap reference if C is 100nF up to 20µF. The minimum of 100nF * should keep the voltage stable long enough for the measurements. - * Changed offsets will be used in next test run. + * Changed offsets will be used in the next test run. */ if (((Scale == -12) && (Value >= 100000)) || @@ -1410,6 +1439,91 @@ uint8_t SmallCap(Capacitor_Type *Cap) } } #endif + + #ifdef SW_C_VLOSS + uint16_t U_Zero; /* zero offset */ + + /* + * get V_loss (in 0.1%) + * - discharge cap and measure voltage offset + * - charge cap for a specific time and measure start voltage + * - wait for a specific time and measure end voltage + * - calculate V_loss + * - based on Karl-Heinz' GetVloss() + */ + + if (CmpValue(Value, Scale, 50, -9) == 1) /* > 50nF */ + { + /* use value in 10nF for timing */ + Ticks = RescaleValue(Value, Scale, -8); /* rescale to 10nF */ + + /* discharge cap */ + DischargeProbes(); /* try to discharge probes */ + if (Check.Found == COMP_ERROR) return 0; /* skip on error */ + + /* get zero offset */ + /* set probes: Gnd -- probe-2 / Gnd -- Rl -- probe-1 */ + ADC_PORT = 0; /* set ADC port to low */ + ADC_DDR = Probes.Pin_2; /* pull down probe #2 directly */ + R_PORT = 0; /* set R port to low */ + R_DDR = Probes.Rl_1; /* pull down probe #1 via Rl */ + U_Zero = ReadU(Probes.Ch_1); /* voltage at probe #1 */ + + /* charge cap for a specific time (half of time units) */ + /* set probes: Gnd -- probe-2 / probe-1 -- Rl - Vcc */ + R_PORT = Probes.Rl_1; /* pull up probe #1 via Rl */ + Ticks2 = Ticks / 2; /* 50% of time units */ + while (Ticks2) /* delay loop */ + { + wait5us(); /* wait 5µs */ + Ticks2--; /* next time unit */ + } + + /* get start voltage */ + /* set probes: Gnd -- probe-2 / probe-1 -- HiZ */ + R_DDR = 0; /* set R port to HiZ mode */ + R_PORT = 0; /* set R port to low */ + wdt_reset(); /* reset watchdog */ + Cfg.Samples = 5; /* just 5 samples to reduce loss of charge */ + Ticks2 = ReadU(Probes.Ch_1); /* voltage at probe #1 */ + if (Ticks2 > U_Zero) /* sanity check */ + { + Ticks2 -= U_Zero; /* consider zero offset */ + } + else /* no voltage rise */ + { + Ticks2 = 0; /* reset voltage */ + } + + /* wait for a specific time (full time) */ + while (Ticks) /* delay loop */ + { + wait5us(); /* wait 5µs */ + Ticks--; /* next time unit */ + } + + /* get end voltage */ + Ticks = ReadU(Probes.Ch_1); /* voltage at probe #1 */ + Cfg.Samples = ADC_SAMPLES; /* set ADC samples back to default */ + wdt_reset(); /* reset watchdog */ + if (Ticks > U_Zero) /* sanity check */ + { + Ticks -= U_Zero; /* consider zero offset */ + } + else /* no voltage rise */ + { + Ticks = 0; /* reset voltage */ + } + + /* calculate V_loss */ + if (Ticks2 > Ticks) /* sanity check */ + { + U_Zero = Ticks2 - Ticks; /* voltage drop */ + /* voltage loss in 0.1% */ + Cap->U_loss = (uint16_t)((unsigned long)(U_Zero * 500UL) / Ticks2); + } + } + #endif } return Flag; @@ -1439,13 +1553,16 @@ void MeasureCap(uint8_t Probe1, uint8_t Probe2, uint8_t ID) */ /* reset cap data */ - Cap = &Caps[ID]; + Cap = &Caps[ID]; /* get pointer */ Cap->A = 0; Cap->B = 0; Cap->Scale = -12; /* pF by default */ Cap->Raw = 0; Cap->Value = 0; - Cap->I_leak = 0; + Cap->I_leak_Value = 0; + #ifdef SW_C_VLOSS + Cap->U_loss = 0; + #endif if (Check.Found == COMP_ERROR) return; /* skip check on any error */ diff --git a/firmware/colors.h b/firmware/colors.h index 0b5c7a7..bce18a9 100644 --- a/firmware/colors.h +++ b/firmware/colors.h @@ -382,13 +382,16 @@ /* titles */ #define COLOR_TITLE COLOR_YELLOW +/* values */ +#define COLOR_VALUE COLOR_YELLOW + /* cursor */ #define COLOR_CURSOR COLOR_YELLOW /* infos (hello/bye) */ #define COLOR_INFO COLOR_CYAN -/* warnings */ +/* warnings (not used yet) */ #define COLOR_WARN COLOR_YELLOW /* errors */ diff --git a/firmware/commands.c b/firmware/commands.c index 59c8b88..117e5f8 100644 --- a/firmware/commands.c +++ b/firmware/commands.c @@ -761,10 +761,10 @@ uint8_t Cmd_I_L(void) if (C) /* valid pointer */ { - if (C->I_leak > 0) /* got I_leak */ + if (C->I_leak_Value > 0) /* got I_leak */ { /* send value */ - Display_Value(C->I_leak, -8, 'A'); /* in 10nA */ + Display_Value(C->I_leak_Value, C->I_leak_Scale, 'A'); /* in A */ } else { @@ -782,6 +782,52 @@ uint8_t Cmd_I_L(void) +#ifdef SW_C_VLOSS + +/* + * command: V_L + * - return V_loss value + * + * returns: + * - SIGNAL_ERR on error + * - SIGNAL_NA on n/a + * - SIGNAL_OK on success + */ + +uint8_t Cmd_V_L(void) +{ + uint8_t Flag = SIGNAL_OK; /* return value */ + Capacitor_Type *C; /* pointer to cap */ + + if (Check.Found == COMP_CAPACITOR) /* capacitor */ + { + C = (Capacitor_Type *)Info.Comp1; /* get pointer */ + + if (C) /* valid pointer */ + { + if (C->U_loss > 0) /* got V_loss */ + { + /* send value */ + Display_Value(C->U_loss, -1, '%'); /* in 0.1% */ + } + else + { + Flag = SIGNAL_NA; /* signal n/a */ + } + } + } + else /* other component */ + { + Flag = SIGNAL_ERR; /* signal error */ + } + + return Flag; +} + +#endif + + + /* * command: V_F * - return V_f value @@ -804,18 +850,26 @@ uint8_t Cmd_V_F(void) break; case COMP_BJT: /* BJT */ - if (Info.Flags & INFO_BJT_D_FB) /* found diode */ + if (Info.Flags & INFO_BJT_D_FB) /* found flyback diode */ { D = (Diode_Type *)Info.Comp1; /* get pointer */ } + else + { + Flag = SIGNAL_NA; /* signal n/a */ + } break; case COMP_FET: /* FET (JFET/MOSFET) */ case COMP_IGBT: /* IGBT */ - if (Info.Flags & INFO_FET_D_FB) /* found diode */ + if (Info.Flags & INFO_FET_D_FB) /* found body/flyback diode */ { D = (Diode_Type *)Info.Comp1; /* get pointer */ } + else + { + Flag = SIGNAL_NA; /* signal n/a */ + } break; case COMP_PUT: /* PUT */ @@ -823,7 +877,7 @@ uint8_t Cmd_V_F(void) break; default: /* unsupported */ - Flag = SIGNAL_ERR; /* signal error */ + Flag = SIGNAL_ERR; /* signal error */ break; } @@ -1501,6 +1555,53 @@ uint8_t Cmd_V_Z(void) +#ifdef SW_SCHOTTKY_BJT + +/* + * command: V_F_clamp + * - return V_f of clamping diode (base-collector diode) + * for Schottky transistor / Schottky-clamped BJT + * + * returns: + * - SIGNAL_ERR on error + * - SIGNAL_NA on n/a + * - SIGNAL_OK on success + */ + +uint8_t Cmd_V_F_clamp(void) +{ + uint8_t Flag = SIGNAL_OK; /* return value */ + Diode_Type *D; /* pointer to diode */ + + if (Check.Found == COMP_BJT) /* BJT */ + { + if (Info.Flags & INFO_BJT_SCHOTTKY) /* Schottky-clamped BJT */ + { + D = (Diode_Type *)Info.Comp2; /* get pointer */ + + if (D) /* valid pointer */ + { + /* send Vf */ + Display_Value(D->V_f, -3, 'V'); /* in mV */ + } + } + else + { + Flag = SIGNAL_NA; /* signal n/a */ + } + } + else /* other component */ + { + Flag = SIGNAL_ERR; /* signal error */ + } + + return Flag; +} + +#endif + + + /* ************************************************************************ * command parsing and processing * ************************************************************************ */ @@ -1794,6 +1895,18 @@ uint8_t RunCommand(uint8_t ID) break; #endif + #ifdef SW_C_VLOSS + case CMD_V_L: /* return V_loss */ + Flag = Cmd_V_L(); /* run command */ + break; + #endif + + #ifdef SW_SCHOTTKY_BJT + case CMD_V_F_CLAMP: /* return V_f of clamping diode */ + Flag = Cmd_V_F_clamp(); /* run command */ + break; + #endif + default: /* unknown/unsupported */ Flag = SIGNAL_ERR; /* signal error */ break; diff --git a/firmware/common.h b/firmware/common.h index 31349d9..f6549cd 100644 --- a/firmware/common.h +++ b/firmware/common.h @@ -230,6 +230,8 @@ #define CMD_I_C 43 /* return I_C */ #define CMD_I_E 44 /* return I_E */ #define CMD_V_Z 45 /* return V_Z */ +#define CMD_V_L 46 /* return V_loss */ +#define CMD_V_F_CLAMP 47 /* return V_f of clamping diode */ @@ -383,9 +385,9 @@ #define SYMBOL_SCR 10 /* SCR / thyristor */ #define SYMBOL_TRIAC 11 /* TRIAC */ #define SYMBOL_PUT 12 /* PUT */ +#define SYMBOL_UJT 13 /* UJT */ /* additional component symbols */ -#define SYMBOL_UJT 13 /* UJT */ #define SYMBOL_QUESTIONMARK 14 /* question mark */ #define SYMBOL_DIODE_ZENER 15 /* Zener diode */ #define SYMBOL_CRYSTAL 16 /* quartz crystal */ @@ -394,7 +396,7 @@ #ifdef SYMBOLS_EXTRA #define NUM_SYMBOLS 17 /* basic plus additional symbols */ #else - #define NUM_SYMBOLS 13 /* basic symbols */ + #define NUM_SYMBOLS 14 /* basic symbols */ #endif @@ -526,9 +528,13 @@ typedef struct /* color support */ #ifdef LCD_COLOR - uint16_t PenColor; /* pen color */ + uint16_t PenColor; /* pen color */ + #if defined (UI_COLORED_TITLES) || defined (UI_COLORED_VALUES) + uint16_t OldColor; /* old color */ + #endif #endif + /* fancy pinout with symbols */ #ifdef SW_SYMBOLS uint8_t SymbolLine; /* line for output */ @@ -638,7 +644,11 @@ typedef struct int8_t Scale; /* exponent of factor (value * 10^x) */ unsigned long Value; /* capacitance incl. zero offset */ unsigned long Raw; /* capacitance excl. zero offset */ - unsigned long I_leak; /* leakage current (in 10nA) */ + uint16_t I_leak_Value; /* leakage current: value (in A) */ + int8_t I_leak_Scale; /* leakage current: exponent (10^x) */ + #ifdef SW_C_VLOSS + uint16_t U_loss; /* voltage loss (in 0.1%) */ + #endif } Capacitor_Type; diff --git a/firmware/config.h b/firmware/config.h index ef2a83e..1324bc3 100644 --- a/firmware/config.h +++ b/firmware/config.h @@ -109,6 +109,7 @@ * - default pin: PC3 (ATmega 328) * - uses voltage divider (standard: 10:1) * - DC-DC boost converter controlled by test push button + * (for alternative control modes see below) * - see TP_ZENER in config_.h for port pin * - uncomment to enable */ @@ -131,14 +132,29 @@ /* * alternative mode for Zener check: don't switch boost converter - * - when the DC-DC boost converter runs all the time - * - when measuring an external voltage (circuit without boost converter) + * - when the DC-DC boost converter runs all the time or when just + * measuring an external voltage (circuit without boost converter) * - uncomment to enable */ //#define ZENER_UNSWITCHED +/* + * alternative mode for Zener check: switch converter via dedicated MCU pin + * - boost converter is controlled by a dedicated I/O pin + * - see BOOST_PORT in config_.h for port pin + * - two drive methods: + * ZENER_BOOST_HIGH high active / enabled when high + * ZENER_BOOST_LOW low active / enabled when low + * - uncomment to enable and choose one drive method + */ + +//#define ZENER_SWITCHED +//#define ZENER_BOOST_HIGH /* high active */ +#define ZENER_BOOST_LOW /* low active */ + + /* * Zener check during normal probing * - requires boost converter running all the time (ZENER_UNSWITCHED) @@ -236,6 +252,7 @@ * - see IR_PORT in config-.h for port pin * - uncomment to enable * - for additional protocols also enable SW_IR_RX_EXTRA + * - for a confirmation beep enable SW_IR_RX_BEEP */ //#define HW_IR_RECEIVER @@ -431,6 +448,15 @@ //#define SW_IR_DISABLE_RESISTOR +/* + * confirmation beep for valid data frame/packet + * - requires buzzer (HW_BUZZER) + * - uncomment to enable + */ + +//#define SW_IR_RX_BEEP + + /* * additional protocols for IR remote control detection/decoder * - uncommon protocols which will increase flash memory usage ;) @@ -539,7 +565,7 @@ * - uncomment to enable */ -#define SW_CAP_LEAKAGE +//#define SW_CAP_LEAKAGE /* @@ -639,6 +665,23 @@ //#define SW_CONTINUITY_CHECK +/* + * show additional info for a possible potentiometer/trimpot + * - shows sum of both resistors and ratio of first resistor in % + * - uncomment to enable + */ + +//#define SW_R_TRIMMER + + +/* + * show self-discharge voltage loss (in %) of a capacitor > 50nF + * - uncomment to enable + */ + +#define SW_C_VLOSS + + /* ************************************************************************ * workarounds for some testers @@ -651,13 +694,25 @@ * - problem: * hFE values are way too high. * - affected testers: - * Hiland M644 (under investigation) + * Hiland M644 (under investigation, possibly poor PCB design) * - uncomment to enable */ //#define NO_HFE_C_RL +/* + * Alternative power control for clones with SCT15L104W management MCU. + * - problem: + * tester turns off suddenly after first probing cycle + * - affected testers: + * T7-H, presumably also other models of the TC-1 family + * - uncomment to enable + */ + +//#define PASSIVE_POWER_CTRL + + /* ************************************************************************ * workarounds for some IDEs @@ -804,7 +859,7 @@ /* * Maximum time to wait after probing (in ms). * - applies to continuous mode only - * - Time between printing the result and starting a new probing cycle. + * - Time between displaying the result and starting a new probing cycle. */ #define CYCLE_DELAY 3000 @@ -907,7 +962,6 @@ //#define UI_PROBE_REVERSED_X - /* * color coding for probes * - requires color graphics display @@ -939,6 +993,17 @@ //#define UI_COLORED_CURSOR +/* + * colored values + * - just the value, not the unit + * - requires color graphics display + * - edit colors.h to select prefered color (COLOR_VALUE) + * - uncomment to enable + */ + +//#define UI_COLORED_VALUES + + /* * automatically exit main menu after running function/tool * - uncomment to enable @@ -982,6 +1047,24 @@ //#define UI_ROUND_DS18B20 +/* + * Center-align infos and some other texts + * - requires display with more than 3 text lines + * - uncomment to enable + */ + +//#define UI_CENTER_ALIGN + + +/* + * confirmation beep when probing is done + * - requires buzzer (HW_BUZZER) + * - uncomment to enable + */ + +//#define UI_PROBING_DONE_BEEP + + /* * storage of firmware data (texts, tables etc) * - self-adjustment data is always stored in EEPROM @@ -1382,716 +1465,13 @@ #endif -/* - * define clock divider - * - supports 1MHz, 2MHz, 4MHz, 8MHz, 16MHz and 20MHz MCU clocks - * - we got only 7 fixed prescalers from 2 up to 128 - */ - -/* 1MHz/250kHz */ -#if CPU_FREQ / ADC_FREQ == 4 - #define ADC_CLOCK_DIV (1 << ADPS1) -#endif - -/* 1MHz/125kHz 2MHz/250kHz */ -#if CPU_FREQ / ADC_FREQ == 8 - #define ADC_CLOCK_DIV (1 << ADPS1) | (1 << ADPS0) -#endif - -/* 2MHz/125kHz 4MHz/250kHz */ -#if CPU_FREQ / ADC_FREQ == 16 - #define ADC_CLOCK_DIV (1 << ADPS2) -#endif - -/* 4MHz/125kHz 8MHz/250kHz */ -#if CPU_FREQ / ADC_FREQ == 32 - #define ADC_CLOCK_DIV (1 << ADPS2) | (1 << ADPS0) -#endif - -/* 8MHz/125kHz 16MHz/250kHz */ -#if CPU_FREQ / ADC_FREQ == 64 - #define ADC_CLOCK_DIV (1 << ADPS2) | (1 << ADPS1) -#endif - -/* 16MHz/125kHz 20MHz/156.25kHz */ -#if CPU_FREQ / ADC_FREQ == 128 - #define ADC_CLOCK_DIV (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0) -#endif - - - -/* ************************************************************************ - * derived values - * ************************************************************************ */ - - -/* - * number of MCU cycles per �s - * - min. 1 (for 1MHz) - * - max. 20 (for 20MHz) - */ - -#define MCU_CYCLES_PER_US (CPU_FREQ / 1000000) - - -/* - * number of MCU cycles per ADC cycle - * - min. 4 - * - max. 128 - */ - -#define MCU_CYCLES_PER_ADC (CPU_FREQ / ADC_FREQ) - - -/* - * time of a MCU cycle (in 0.1 ns) - */ - -#define MCU_CYCLE_TIME (10000 / (CPU_FREQ / 1000000)) - - - -/* ************************************************************************ - * options management - * ************************************************************************ */ - - -/* - * storage of program data (EEPROM/Flash) - */ - -#if defined (DATA_EEPROM) - /* memory type */ - #define MEM_TYPE EEMEM - - /* read functions */ - #define DATA_read_byte(addr) eeprom_read_byte(addr) - #define DATA_read_word(addr) eeprom_read_word(addr) -#elif defined (DATA_FLASH) - /* memory type */ - #define MEM_TYPE PROGMEM - - /* read functions */ - #define DATA_read_byte(addr) pgm_read_byte(addr) - #define DATA_read_word(addr) pgm_read_word(addr) -#endif - - - -/* - * hardware/software options - */ - -/* power switch: prefer soft-latching type */ -#ifdef POWER_SWITCH_SOFT - #ifdef POWER_SWITCH_MANUAL - #undef POWER_SWITCH_MANUAL - #endif -#endif - - -/* additional keys */ -/* rotary encoder, increase/decrease push buttons or touch screen */ -#if defined (HW_ENCODER) || defined (HW_INCDEC_KEYS) | defined (HW_TOUCH) - #define HW_KEYS -#endif - -/* options which require additional keys */ -#ifndef HW_KEYS - - /* key hints */ - #ifdef UI_KEY_HINTS - #undef UI_KEY_HINTS - #endif - - /* PWM+ */ - #ifdef SW_PWM_PLUS - #undef SW_PWM_PLUS - #define SW_PWM_SIMPLE - #endif - - /* squarewave generator */ - #ifdef SW_SQUAREWAVE - #undef SW_SQUAREWAVE - #endif - - /* Servo Check */ - #ifdef SW_SERVO - #undef SW_SERVO - #endif - - /* event counter */ - #ifdef HW_EVENT_COUNTER - #undef HW_EVENT_COUNTER - #endif - - /* IR Sender */ - #ifdef SW_IR_TRANSMITTER - #undef SW_IR_TRANSMITTER - #endif - - /* logic probe */ - #ifdef HW_LOGIC_PROBE - #undef HW_LOGIC_PROBE - #endif - -#endif - - -/* options which require inductance measurement */ -#ifndef SW_INDUCTOR - - /* L monitor */ - #ifdef SW_MONITOR_L - #undef SW_MONITOR_L - #endif - - /* RCL Monitor */ - #ifdef SW_MONITOR_RCL - #undef SW_MONITOR_RCL - #endif - - /* RL Monitor */ - #ifdef SW_MONITOR_RL - #undef SW_MONITOR_RL - #endif - -#endif - - -/* options which require ESR measurement */ -#if ! defined (SW_ESR) && ! defined (SW_OLD_ESR) - /* ESR tool */ - #ifdef SW_ESR_TOOL - #undef SW_ESR_TOOL - #endif -#endif - - -/* options which require a buzzer */ -#if ! defined (HW_BUZZER) - /* continuity check */ - #ifdef SW_CONTINUITY_CHECK - #undef SW_CONTINUITY_CHECK - #endif -#endif - - -/* options which require a MCU clock >= 8MHz */ -#if CPU_FREQ < 8000000 - - /* ESR measurement */ - #ifdef SW_ESR - #undef SW_ESR - #endif - - /* old ESR measurement */ - #ifdef SW_OLD_ESR - #undef SW_OLD_ESR - #endif - -#endif - - -/* SPI: either bit-bang or hardware */ -#if defined (SPI_BITBANG) && defined (SPI_HARDWARE) - #error <<< Select either bitbang or hardware SPI! >>> -#endif - -/* SPI: common switch */ -#if defined (SPI_BITBANG) || defined (SPI_HARDWARE) - #define HW_SPI -#endif - -/* 9-Bit SPI requires bit-bang mode */ -#ifdef SPI_9 - #ifndef SPI_BITBANG - #error <<< 9-Bit SPI requires bit-bang mode! >>> - #endif -#endif - -/* options which require SPI */ -#ifndef HW_SPI - /* SPI read support */ - #ifdef SPI_RW - #undef SPI_RW - #endif -#endif - -/* options which require SPI read support */ -#ifndef SPI_RW - /* MAX6675 */ - #ifdef HW_MAX6675 - #undef HW_MAX6675 - #endif - /* MAX31855 */ - #ifdef HW_MAX31855 - #undef HW_MAX31855 - #endif -#endif - - -/* I2C: either bit-bang or hardware */ -#if defined (I2C_BITBANG) && defined (I2C_HARDWARE) - #error <<< Select either bitbang or hardware I2C! >>> -#endif - -/* I2C: common switch */ -#if defined (I2C_BITBANG) || defined (I2C_HARDWARE) - #define HW_I2C -#endif - - -/* TTL serial: either bit-bang or hardware */ -#if defined (SERIAL_BITBANG) && defined (SERIAL_HARDWARE) - #error <<< Select either bitbang or hardware serial interface! >>> -#endif - -/* TTL serial: common switch */ -#if defined (SERIAL_BITBANG) || defined (SERIAL_HARDWARE) - #define HW_SERIAL -#endif - -/* VT100 display driver disables other options for serial interface */ -#ifdef LCD_VT100 - #ifdef UI_SERIAL_COPY - #undef UI_SERIAL_COPY - #endif - #ifdef UI_SERIAL_COMMANDS - #undef UI_SERIAL_COMMANDS - #endif -#endif - -/* options which require TTL serial */ -#ifndef HW_SERIAL - /* VT100 display */ - #ifdef LCD_VT100 - #undef LCD_VT100 - #endif - /* serial copy */ - #ifdef UI_SERIAL_COPY - #undef UI_SERIAL_COPY - #endif - /* remote commands */ - #ifdef UI_SERIAL_COMMANDS - #undef UI_SERIAL_COMMANDS - #endif -#endif - -/* options which require TTL serial RW */ -#ifndef SERIAL_RW - #ifdef UI_SERIAL_COMMANDS - #undef UI_SERIAL_COMMANDS - #endif -#endif - - -/* OneWire */ -#if defined (ONEWIRE_PROBES) && defined (ONEWIRE_IO_PIN) - #error <<< Select either probes or dedicated IO pin for Onewire! >>> -#endif - -/* options which require OneWire */ -#if ! defined (ONEWIRE_PROBES) && ! defined (ONEWIRE_IO_PIN) - - /* DS18B20 */ - #ifdef SW_DS18B20 - #undef SW_DS18B20 - #endif - - /* OneWire scan */ - #ifdef SW_ONEWIRE_SCAN - #undef SW_ONEWIRE_SCAN - #endif - -#endif - - -/* touchscreen */ -#ifdef TOUCH_PORT - #define HW_TOUCH -#endif - - -/* LCD module */ -#ifdef LCD_CONTRAST - #define SW_CONTRAST -#else - #define LCD_CONTRAST 0 -#endif - - -/* options which require a color display */ -#ifndef LCD_COLOR - - /* color coding for probes */ - #ifdef UI_PROBE_COLORS - #undef UI_PROBE_COLORS - #endif - - /* colored titles */ - #ifdef UI_COLORED_TITLES - #undef UI_COLORED_TITLES - #endif - - /* colored cursor and key hints */ - #ifdef UI_COLORED_CURSOR - #undef UI_COLORED_CURSOR - #endif - -#endif - - -/* options which require a color graphics display */ -#if ! defined (LCD_COLOR) || ! defined (LCD_GRAPHIC) - - /* resistor color-codes */ - #ifdef SW_R_E24_5_CC - #undef SW_R_E24_5_CC - #endif - #ifdef SW_R_E24_1_CC - #undef SW_R_E24_1_CC - #endif - #ifdef SW_R_E96_CC - #undef SW_R_E96_CC - #endif - -#endif - - -/* additional font characters with reversed colors */ -#if defined (UI_PROBE_REVERSED) || defined (UI_PROBE_REVERSED_X) - #ifndef FONT_EXTRA - #define FONT_EXTRA - #endif - #ifndef FONT_INVERSE - #define FONT_INVERSE - #endif -#endif - - -/* component symbols for fancy pinout */ -#if defined (SYMBOLS_24X24_H) || defined (SYMBOLS_24X24_OLD_H) || defined (SYMBOLS_24X24_ALT1_H) || defined (SYMBOLS_24X24_ALT2_H) - #define SYMBOLS_SELECTED -#endif -#if defined (SYMBOLS_24X24_HF) || defined (SYMBOLS_24X24_OLD_HF) || defined (SYMBOLS_24X24_ALT1_HF) || defined (SYMBOLS_24X24_ALT2_HF) - #define SYMBOLS_SELECTED -#endif -#if defined (SYMBOLS_24X24_VFP) || defined (SYMBOLS_24X24_OLD_VFP) || defined (SYMBOLS_24X24_ALT1_VFP) || defined (SYMBOLS_24X24_ALT2_VFP) - #define SYMBOLS_SELECTED -#endif -#if defined (SYMBOLS_24X24_VP_F) || defined (SYMBOLS_24X24_OLD_VP_F) || defined (SYMBOLS_24X24_ALT1_VP_F) || defined (SYMBOLS_24X24_ALT2_VP_F) - #define SYMBOLS_SELECTED -#endif -#if defined (SYMBOLS_30X32_HF) || defined (SYMBOLS_30X32_OLD_HF) || defined (SYMBOLS_30X32_ALT1_HF) || defined (SYMBOLS_30X32_ALT2_HF) - #define SYMBOLS_SELECTED -#endif -#if defined (SYMBOLS_32X32_HF) || defined (SYMBOLS_32X32_OLD_HF) || defined (SYMBOLS_32X32_ALT1_HF) || defined (SYMBOLS_32X32_ALT2_HF) - #define SYMBOLS_SELECTED -#endif -#if defined (SYMBOLS_32X39_HF) - #define SYMBOLS_SELECTED -#endif - - -/* fancy pinout requires graphic display and symbol set */ -#ifdef SW_SYMBOLS - - /* graphic display */ - #ifndef LCD_GRAPHIC - #undef SW_SYMBOLS - #endif - - /* symbol set */ - #ifndef SYMBOLS_SELECTED - #undef SW_SYMBOLS - #endif - -#endif - - -/* additional component symbols */ -#if defined (SW_UJT) || defined (UI_QUESTION_MARK) || defined (UI_ZENER_DIODE) || defined (UI_QUARTZ_CRYSTAL) - #ifndef SYMBOLS_EXTRA - #define SYMBOLS_EXTRA - #endif -#endif - - -/* options which require component symbols / fancy pinout */ -#ifndef SW_SYMBOLS - - /* question mark symbol */ - #ifdef UI_QUESTION_MARK - #undef UI_QUESTION_MARK - #endif - - /* Zener diode symbol */ - #ifdef UI_ZENER_DIODE - #undef UI_ZENER_DIODE - #endif - - /* quartz crystal symbol */ - #ifdef UI_QUARTZ_CRYSTAL - #undef UI_QUARTZ_CRYSTAL - #endif - - /* disabling text pinout */ - #ifdef UI_NO_TEXTPINOUT - #undef UI_NO_TEXTPINOUT - #endif - - /* test-output of component symbols */ - #ifdef SW_SYMBOL_TEST - #undef SW_SYMBOL_TEST - #endif - -#endif - - -/* frequency counter */ -#if defined (HW_FREQ_COUNTER_BASIC) || defined (HW_FREQ_COUNTER_EXT) - #define HW_FREQ_COUNTER -#endif - - -/* ring tester */ -#if defined (HW_RING_TESTER) - /* requires pulse output */ - #if ! defined (RING_TESTER_PIN) && ! defined (RING_TESTER_PROBES) - #error <<< Select pulse output for ring tester! >>> - #endif - /* prefer dedicated pin */ - #if defined (RING_TESTER_PIN) && defined (RING_TESTER_PROBES) - #undef RING_TESTER_PROBES - #endif -#endif - - -/* IR detector/decoder */ -#if defined (SW_IR_RECEIVER) && defined (HW_IR_RECEIVER) - #error <<< Select either probes or dedicated IO pin for IR detector! >>> -#endif - - -/* rounding for DS18B20 requires DS18B20 support */ -#ifdef UI_ROUND_DS18B20 - #ifndef SW_DS18B20 - #undef UI_ROUND_DS18B20 - #endif -#endif - - -/* Zener check during normal probing requires "unswitched" mode */ -#ifdef HW_PROBE_ZENER - #ifndef ZENER_UNSWITCHED - #undef HW_PROBE_ZENER - #endif -#endif - - -/* read functions for display require bus with read support enabled */ -#ifdef LCD_READ - #if defined (LCD_SPI) && ! defined (SPI_RW) - #undef LCD_READ - #endif - #if defined (LCD_I2C) && ! defined (I2C_RW) - #undef LCD_READ - #endif - /* can't check parallel busses */ -#endif - -/* display ID requires read functions for display */ -#ifdef SW_DISPLAY_ID - #ifndef LCD_READ - #undef SW_DISPLAY_ID - #endif -#endif - -/* output of display registers requires read functions for display - and serial output */ -#ifdef SW_DISPLAY_REG - #ifndef LCD_READ - #undef SW_DISPLAY_REG - #endif - #ifndef UI_SERIAL_COPY - #undef SW_DISPLAY_REG - #endif -#endif - - /* ************************************************************************ - * simplify ifdefs + * additional stuff supporting this configuration * ************************************************************************ */ -/* ProbePinout() */ -#if defined (SW_PWM_SIMPLE) || defined (SW_PWM_PLUS) || defined (SW_SQUAREWAVE) || defined (SW_SERVO) - #ifndef FUNC_PROBE_PINOUT - #define FUNC_PROBE_PINOUT - #endif -#endif - -#if defined (SW_ESR_TOOL) || defined (SW_CONTINUITY_CHECK) - #ifndef FUNC_PROBE_PINOUT - #define FUNC_PROBE_PINOUT - #endif -#endif - -#if defined (SW_MONITOR_R) || defined (SW_MONITOR_C) || defined (SW_MONITOR_L) || defined(SW_MONITOR_RCL) || defined(SW_MONITOR_RL) - #ifndef FUNC_PROBE_PINOUT - #define FUNC_PROBE_PINOUT - #endif -#endif - -#if defined (HW_RING_TESTER) && defined (RING_TESTER_PROBES) - #ifndef FUNC_PROBE_PINOUT - #define FUNC_PROBE_PINOUT - #endif -#endif - - -/* E6 norm values */ -#if defined (SW_C_E6_T) || defined (SW_L_E6_T) - #define SW_E6 -#endif - -/* E12 norm values */ -#if defined (SW_C_E12_T) || defined (SW_L_E12_T) - #define SW_E12 -#endif - -/* E24 norm values */ -#if defined (SW_R_E24_5_T) || defined (SW_R_E24_5_CC) || defined (SW_R_E24_1_T) || defined (SW_R_E24_1_CC) - #define SW_E24 -#endif - -/* E96 norm values */ -#if defined (SW_R_E96_T) || defined (SW_R_E96_CC) || defined (SW_R_E96_EIA96) - #define SW_E96 -#endif - - -/* Show_ENormValues(), Display_EValue() */ -#if defined (SW_R_E24_5_T) || defined (SW_R_E24_1_T) || defined (SW_R_E96_T) - #ifndef FUNC_EVALUE - #define FUNC_EVALUE - #endif - #ifndef SW_R_EXX - #define SW_R_EXX - #endif -#endif - -#if defined (SW_C_E6_T) || defined (SW_C_E12_T) || defined (SW_L_E6_T) || defined (SW_L_E12_T) - #ifndef FUNC_EVALUE - #define FUNC_EVALUE - #endif -#endif - - -/* Show_ENormCodes(), Display_ColorCode() */ -#if defined (SW_R_E24_5_CC) || defined (SW_R_E24_1_CC) || defined (SW_R_E96_CC) - #ifndef FUNC_COLORCODE - #define FUNC_COLORCODE - #endif - #ifndef SW_R_EXX - #define SW_R_EXX - #endif -#endif - - -/* Show_ENormEIA96(), Display_EIA96() */ -#if defined (SW_R_E96_EIA96) - #ifndef FUNC_EIA96 - #define FUNC_EIA96 - #endif - #ifndef SW_R_EXX - #define SW_R_EXX - #endif -#endif - - -/* SmoothLongKeyPress() */ -#if defined (SW_PWM_PLUS) || defined (SW_SERVO) || defined (HW_EVENT_COUNTER) || defined (HW_LC_METER) - #ifndef FUNC_SMOOTHLONGKEYPRESS - #define FUNC_SMOOTHLONGKEYPRESS - #endif -#endif - - -/* Display_FullValue() */ -#if defined (SW_SQUAREWAVE) || defined (SW_PWM_PLUS) || defined (HW_FREQ_COUNTER_EXT) || defined (SW_SERVO) - #ifndef FUNC_DISPLAY_FULLVALUE - #define FUNC_DISPLAY_FULLVALUE - #endif -#endif - -#if defined (HW_EVENT_COUNTER) || defined (SW_DHTXX) || defined (LC_METER_SHOW_FREQ) || defined (HW_MAX6675) - #ifndef FUNC_DISPLAY_FULLVALUE - #define FUNC_DISPLAY_FULLVALUE - #endif -#endif - -#if defined (FUNC_EVALUE) || defined (FUNC_COLORCODE) || defined (FUNC_EIA96) - #ifndef FUNC_DISPLAY_FULLVALUE - #define FUNC_DISPLAY_FULLVALUE - #endif -#endif - - -/* Display_SignedFullValue() */ -#if defined (SW_DS18B20) || defined (SW_DHTXX) || defined (HW_MAX31855) - #ifndef FUNC_DISPLAY_SIGNEDFULLVALUE - #define FUNC_DISPLAY_SIGNEDFULLVALUE - #endif -#endif - - -/* Display_HexByte() */ -#if defined (SW_IR_RECEIVER) || defined (HW_IR_RECEIVER) || defined (ONEWIRE_READ_ROM) || defined (SW_ONEWIRE_SCAN) - #ifndef FUNC_DISPLAY_HEXBYTE - #define FUNC_DISPLAY_HEXBYTE - #endif -#endif - -#if defined (SW_FONT_TEST) || defined (SW_SYMBOL_TEST) || defined (SW_DISPLAY_REG) - #ifndef FUNC_DISPLAY_HEXBYTE - #define FUNC_DISPLAY_HEXBYTE - #endif -#endif - - -/* Display_HexValue() */ -#if defined (SW_IR_TRANSMITTER) || defined (SW_DISPLAY_ID) - #ifndef FUNC_DISPLAY_HEXVALUE - #define FUNC_DISPLAY_HEXVALUE - #endif -#endif - - -/* Celsius2Fahrenheit() */ -#ifdef UI_FAHRENHEIT - #if defined (SW_DS18B20) || defined (SW_DHTXX) || defined (HW_MAX6675) || defined (HW_MAX31855) - #ifndef FUNC_CELSIUS2FAHRENHEIT - #define FUNC_CELSIUS2FAHRENHEIT - #endif - #endif -#endif - - -/* variable Start_str */ -#if defined (SW_OPTO_COUPLER) || defined (SW_DS18B20) || defined (SW_ONEWIRE_SCAN) || defined (HW_EVENT_COUNTER) - #ifndef VAR_START_STR - #define VAR_START_STR - #endif -#endif - -#if defined (HW_MAX6675) || defined (HW_MAX31855) - #ifndef VAR_START_STR - #define VAR_START_STR - #endif -#endif +#include "config_support.h" diff --git a/firmware/config_1280.h b/firmware/config_1280.h index 7bd1d30..61b51fa 100644 --- a/firmware/config_1280.h +++ b/firmware/config_1280.h @@ -1004,16 +1004,6 @@ -/* - * check if a LCD module is specified - */ - -#if !defined(LCD_TEXT) && !defined(LCD_GRAPHIC) - #error <<< No LCD module specified! >>> -#endif - - - /* ************************************************************************ * touchscreen (optional) * ************************************************************************ */ @@ -1058,10 +1048,9 @@ /* * test pins / probes: - * - Must be an ADC port - * - Port K (ADC8-15) not supported - * - Lower 3 pins of the port must be used for probes. - * - Please don't change the definitions of TP1, TP2 and TP3! + * - Must be an ADC port! + * - Port K (ADC8-15) is not supported. + * - It's recommended to use the lower 3 pins for the probes. * - Don't share this port with POWER_CTRL or TEST_BUTTON! */ @@ -1308,6 +1297,14 @@ #define MAX31855_CS PA2 /* port pin used for /CS */ +/* + * boost converter for Zener check (dedicated I/O pin) + */ + +#define BOOST_PORT PORTA /* port data register */ +#define BOOST_DDR DDRA /* port data direction register */ +#define BOOST_CTRL PA2 /* control pin */ + /* * relay for parallel cap (sampling ADC) diff --git a/firmware/config_328.h b/firmware/config_328.h index 63544ca..54343fa 100644 --- a/firmware/config_328.h +++ b/firmware/config_328.h @@ -61,6 +61,8 @@ //#define FONT_HD44780_WIN1251 /* Cyrillic font (European) */ #endif + + /* * HD44780 plus PCF8574 based backpack * - I2C interface using bit-bang I2C @@ -855,16 +857,6 @@ -/* - * check if a LCD module is specified - */ - -#if !defined(LCD_TEXT) && !defined(LCD_GRAPHIC) - #error <<< No LCD module specified! >>> -#endif - - - /* ************************************************************************ * port and pin assignments * ************************************************************************ */ @@ -872,9 +864,8 @@ /* * test pins / probes: - * - Must be an ADC port - * - Lower 3 pins of the port must be used for probes. - * - Please don't change the definitions of TP1, TP2 and TP3! + * - Must be an ADC port! + * - It's recommended to use the lower 3 pins for the probes. * - Don't share this port with POWER_CTRL or TEST_BUTTON! */ @@ -935,7 +926,7 @@ #define BUTTON_PORT PORTD /* port data register */ #define BUTTON_DDR DDRD /* port data direction register */ #define BUTTON_PIN PIND /* port input pins register */ -#define TEST_BUTTON PD2 /* test/start push button (low active) */ +#define TEST_BUTTON PD7 /* test/start push button (low active) */ /* @@ -946,7 +937,7 @@ #define ENCODER_DDR DDRD /* port data direction register */ #define ENCODER_PIN PIND /* port input pins register */ #define ENCODER_A PD3 /* rotary encoder A signal */ -#define ENCODER_B PD4 /* rotary encoder B signal */ +#define ENCODER_B PD2 /* rotary encoder B signal */ /* @@ -1085,6 +1076,15 @@ #define MAX31855_CS PD5 /* port pin used for /CS */ +/* + * boost converter for Zener check (dedicated I/O pin) + */ + +#define BOOST_PORT PORTD /* port data register */ +#define BOOST_DDR DDRD /* port data direction register */ +#define BOOST_CTRL PD5 /* control pin */ + + /* ************************************************************************ * internal stuff diff --git a/firmware/config_644.h b/firmware/config_644.h index 2283dd9..7b2c9e6 100644 --- a/firmware/config_644.h +++ b/firmware/config_644.h @@ -906,16 +906,6 @@ -/* - * check if a LCD module is specified - */ - -#if !defined(LCD_TEXT) && !defined(LCD_GRAPHIC) - #error <<< No LCD module specified! >>> -#endif - - - /* ************************************************************************ * touchscreen (optional) * ************************************************************************ */ @@ -960,9 +950,8 @@ /* * test pins / probes: - * - Must be an ADC port - * - Lower 3 pins of the port must be used for probes. - * - Please don't change the definitions of TP1, TP2 and TP3! + * - Must be an ADC port! + * - It's recommended to use the lower 3 pins for the probes. * - Don't share this port with POWER_CTRL or TEST_BUTTON! */ @@ -1207,6 +1196,15 @@ #define MAX31855_CS PC2 /* port pin used for /CS */ +/* + * boost converter for Zener check (dedicated I/O pin) + */ + +#define BOOST_PORT PORTC /* port data register */ +#define BOOST_DDR DDRC /* port data direction register */ +#define BOOST_CTRL PC2 /* control pin */ + + /* * relay for parallel cap (sampling ADC) * - between TP1 & TP3 diff --git a/firmware/config_support.h b/firmware/config_support.h new file mode 100644 index 0000000..f393696 --- /dev/null +++ b/firmware/config_support.h @@ -0,0 +1,1006 @@ +/* ************************************************************************ + * + * support for global configuration + * + * (c) 2012-2022 by Markus Reschke + * based on code from Markus Frejek and Karl-Heinz Kübbeler + * + * ************************************************************************ */ + + +/* source management */ +#define CONFIG_SUPPORT_H + + + +/* ************************************************************************ + * ADC clock + * ************************************************************************ */ + + +/* + * define clock divider + * - supports 1MHz, 2MHz, 4MHz, 8MHz, 16MHz and 20MHz MCU clocks + * - we got only 7 fixed prescalers from 2 up to 128 + */ + +/* 1MHz/250kHz */ +#if CPU_FREQ / ADC_FREQ == 4 + #define ADC_CLOCK_DIV (1 << ADPS1) +#endif + +/* 1MHz/125kHz 2MHz/250kHz */ +#if CPU_FREQ / ADC_FREQ == 8 + #define ADC_CLOCK_DIV (1 << ADPS1) | (1 << ADPS0) +#endif + +/* 2MHz/125kHz 4MHz/250kHz */ +#if CPU_FREQ / ADC_FREQ == 16 + #define ADC_CLOCK_DIV (1 << ADPS2) +#endif + +/* 4MHz/125kHz 8MHz/250kHz */ +#if CPU_FREQ / ADC_FREQ == 32 + #define ADC_CLOCK_DIV (1 << ADPS2) | (1 << ADPS0) +#endif + +/* 8MHz/125kHz 16MHz/250kHz */ +#if CPU_FREQ / ADC_FREQ == 64 + #define ADC_CLOCK_DIV (1 << ADPS2) | (1 << ADPS1) +#endif + +/* 16MHz/125kHz 20MHz/156.25kHz */ +#if CPU_FREQ / ADC_FREQ == 128 + #define ADC_CLOCK_DIV (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0) +#endif + + + +/* ************************************************************************ + * derived values + * ************************************************************************ */ + + +/* + * number of MCU cycles per µs + * - min. 1 (for 1MHz) + * - max. 20 (for 20MHz) + */ + +#define MCU_CYCLES_PER_US (CPU_FREQ / 1000000) + + +/* + * number of MCU cycles per ADC cycle + * - min. 4 + * - max. 128 + */ + +#define MCU_CYCLES_PER_ADC (CPU_FREQ / ADC_FREQ) + + +/* + * time of a MCU cycle (in 0.1 ns) + */ + +#define MCU_CYCLE_TIME (10000 / (CPU_FREQ / 1000000)) + + + +/* ************************************************************************ + * check display drivers + * ************************************************************************ */ + + +/* + * check if a display module is specified + */ + +#if ! defined (LCD_TEXT) && ! defined (LCD_GRAPHIC) + #error <<< No display module specified! >>> +#endif + + +/* + * check if more than one display module is specified + * - does not work for enabling same display multiple times + */ + +#ifdef LCD_HD44780 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_HD44780 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_ILI9163 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_ILI9163 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_ILI9341 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_ILI9341 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_ILI9481 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_ILI9481 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_ILI9486 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_ILI9486 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_ILI9488 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_ILI9488 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_PCD8544 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_PCD8544 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_PCF8814 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_PCF8814 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_SH1106 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_SH1106 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_SSD1306 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_SSD1306 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_ST7036 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_ST7036 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_ST7565R + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_ST7565R + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_ST7735 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_ST7735 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_SEMI_ST7735 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_SEMI_ST7735 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_ST7920 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_ST7920 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_STE2007 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_STE2007 + #else + #define DISPLAY_ONE + #endif +#endif + +#ifdef LCD_VT100 + #ifdef DISPLAY_ONE + #ifndef DISPLAY_MULTI + #define DISPLAY_MULTI + #endif + #undef LCD_VT100 + #else + #define DISPLAY_ONE + #endif +#endif + +/* show error */ +#ifdef DISPLAY_MULTI + #error <<< Multiple display modules specified! >>> +#endif + +/* clean up */ +#undef DISPLAY_ONE +#undef DISPLAY_MULTI + + + +/* ************************************************************************ + * options management + * ************************************************************************ */ + + +/* + * storage of program data (EEPROM/Flash) + */ + +#if defined (DATA_EEPROM) + /* memory type */ + #define MEM_TYPE EEMEM + + /* read functions */ + #define DATA_read_byte(addr) eeprom_read_byte(addr) + #define DATA_read_word(addr) eeprom_read_word(addr) +#elif defined (DATA_FLASH) + /* memory type */ + #define MEM_TYPE PROGMEM + + /* read functions */ + #define DATA_read_byte(addr) pgm_read_byte(addr) + #define DATA_read_word(addr) pgm_read_word(addr) +#endif + + + +/* + * hardware/software options + */ + +/* power switch: prefer soft-latching type */ +#ifdef POWER_SWITCH_SOFT + #ifdef POWER_SWITCH_MANUAL + #undef POWER_SWITCH_MANUAL + #endif +#endif + + +/* additional keys */ +/* rotary encoder, increase/decrease push buttons or touch screen */ +#if defined (HW_ENCODER) || defined (HW_INCDEC_KEYS) | defined (HW_TOUCH) + #define HW_KEYS +#endif + +/* options which require additional keys */ +#ifndef HW_KEYS + + /* key hints */ + #ifdef UI_KEY_HINTS + #undef UI_KEY_HINTS + #endif + + /* PWM+ */ + #ifdef SW_PWM_PLUS + #undef SW_PWM_PLUS + #define SW_PWM_SIMPLE + #endif + + /* squarewave generator */ + #ifdef SW_SQUAREWAVE + #undef SW_SQUAREWAVE + #endif + + /* Servo Check */ + #ifdef SW_SERVO + #undef SW_SERVO + #endif + + /* event counter */ + #ifdef HW_EVENT_COUNTER + #undef HW_EVENT_COUNTER + #endif + + /* IR Sender */ + #ifdef SW_IR_TRANSMITTER + #undef SW_IR_TRANSMITTER + #endif + + /* logic probe */ + #ifdef HW_LOGIC_PROBE + #undef HW_LOGIC_PROBE + #endif + +#endif + + +/* options which require inductance measurement */ +#ifndef SW_INDUCTOR + + /* L monitor */ + #ifdef SW_MONITOR_L + #undef SW_MONITOR_L + #endif + + /* RCL Monitor */ + #ifdef SW_MONITOR_RCL + #undef SW_MONITOR_RCL + #endif + + /* RL Monitor */ + #ifdef SW_MONITOR_RL + #undef SW_MONITOR_RL + #endif + +#endif + + +/* options which require ESR measurement */ +#if ! defined (SW_ESR) && ! defined (SW_OLD_ESR) + /* ESR tool */ + #ifdef SW_ESR_TOOL + #undef SW_ESR_TOOL + #endif +#endif + + +/* options which require a buzzer */ +#if ! defined (HW_BUZZER) + + /* continuity check */ + #ifdef SW_CONTINUITY_CHECK + #undef SW_CONTINUITY_CHECK + #endif + + /* probing: confirmation beep when done */ + #ifdef UI_PROBING_DONE_BEEP + #undef UI_PROBING_DONE_BEEP + #endif + + /* IR receiver/decoder: confirmation beep for valid frame/packet */ + #ifdef SW_IR_RX_BEEP + #undef SW_IR_RX_BEEP + #endif + +#endif + + +/* options which require a MCU clock >= 8MHz */ +#if CPU_FREQ < 8000000 + + /* ESR measurement */ + #ifdef SW_ESR + #undef SW_ESR + #endif + + /* old ESR measurement */ + #ifdef SW_OLD_ESR + #undef SW_OLD_ESR + #endif + +#endif + + +/* SPI: either bit-bang or hardware */ +#if defined (SPI_BITBANG) && defined (SPI_HARDWARE) + #error <<< Select either bitbang or hardware SPI! >>> +#endif + +/* SPI: common switch */ +#if defined (SPI_BITBANG) || defined (SPI_HARDWARE) + #define HW_SPI +#endif + +/* 9-Bit SPI requires bit-bang mode */ +#ifdef SPI_9 + #ifndef SPI_BITBANG + #error <<< 9-Bit SPI requires bit-bang mode! >>> + #endif +#endif + +/* options which require SPI */ +#ifndef HW_SPI + /* SPI read support */ + #ifdef SPI_RW + #undef SPI_RW + #endif +#endif + +/* options which require SPI read support */ +#ifndef SPI_RW + /* MAX6675 */ + #ifdef HW_MAX6675 + #undef HW_MAX6675 + #endif + /* MAX31855 */ + #ifdef HW_MAX31855 + #undef HW_MAX31855 + #endif +#endif + + +/* I2C: either bit-bang or hardware */ +#if defined (I2C_BITBANG) && defined (I2C_HARDWARE) + #error <<< Select either bitbang or hardware I2C! >>> +#endif + +/* I2C: common switch */ +#if defined (I2C_BITBANG) || defined (I2C_HARDWARE) + #define HW_I2C +#endif + + +/* TTL serial: either bit-bang or hardware */ +#if defined (SERIAL_BITBANG) && defined (SERIAL_HARDWARE) + #error <<< Select either bitbang or hardware serial interface! >>> +#endif + +/* TTL serial: common switch */ +#if defined (SERIAL_BITBANG) || defined (SERIAL_HARDWARE) + #define HW_SERIAL +#endif + +/* VT100 display driver disables other options for serial interface */ +#ifdef LCD_VT100 + #ifdef UI_SERIAL_COPY + #undef UI_SERIAL_COPY + #endif + #ifdef UI_SERIAL_COMMANDS + #undef UI_SERIAL_COMMANDS + #endif +#endif + +/* options which require TTL serial */ +#ifndef HW_SERIAL + /* VT100 display */ + #ifdef LCD_VT100 + #undef LCD_VT100 + #endif + /* serial copy */ + #ifdef UI_SERIAL_COPY + #undef UI_SERIAL_COPY + #endif + /* remote commands */ + #ifdef UI_SERIAL_COMMANDS + #undef UI_SERIAL_COMMANDS + #endif +#endif + +/* options which require TTL serial RW */ +#ifndef SERIAL_RW + #ifdef UI_SERIAL_COMMANDS + #undef UI_SERIAL_COMMANDS + #endif +#endif + + +/* OneWire */ +#if defined (ONEWIRE_PROBES) && defined (ONEWIRE_IO_PIN) + #error <<< Select either probes or dedicated IO pin for Onewire! >>> +#endif + +/* options which require OneWire */ +#if ! defined (ONEWIRE_PROBES) && ! defined (ONEWIRE_IO_PIN) + + /* DS18B20 */ + #ifdef SW_DS18B20 + #undef SW_DS18B20 + #endif + + /* OneWire scan */ + #ifdef SW_ONEWIRE_SCAN + #undef SW_ONEWIRE_SCAN + #endif + +#endif + + +/* touchscreen */ +#ifdef TOUCH_PORT + #define HW_TOUCH +#endif + + +/* LCD module */ +#ifdef LCD_CONTRAST + #define SW_CONTRAST +#else + #define LCD_CONTRAST 0 +#endif + + +/* options which require a color display */ +#ifndef LCD_COLOR + + /* color coding for probes */ + #ifdef UI_PROBE_COLORS + #undef UI_PROBE_COLORS + #endif + + /* colored titles */ + #ifdef UI_COLORED_TITLES + #undef UI_COLORED_TITLES + #endif + + /* colored values */ + #ifdef UI_COLORED_VALUES + #undef UI_COLORED_VALUES + #endif + + /* colored cursor and key hints */ + #ifdef UI_COLORED_CURSOR + #undef UI_COLORED_CURSOR + #endif + +#endif + + +/* options which require a color graphics display */ +#if ! defined (LCD_COLOR) || ! defined (LCD_GRAPHIC) + + /* resistor color-codes */ + #ifdef SW_R_E24_5_CC + #undef SW_R_E24_5_CC + #endif + #ifdef SW_R_E24_1_CC + #undef SW_R_E24_1_CC + #endif + #ifdef SW_R_E96_CC + #undef SW_R_E96_CC + #endif + +#endif + + +/* additional font characters with reversed colors */ +#if defined (UI_PROBE_REVERSED) || defined (UI_PROBE_REVERSED_X) + #ifndef FONT_EXTRA + #define FONT_EXTRA + #endif + #ifndef FONT_INVERSE + #define FONT_INVERSE + #endif +#endif + + +/* component symbols for fancy pinout */ +#if defined (SYMBOLS_24X24_H) || defined (SYMBOLS_24X24_OLD_H) || defined (SYMBOLS_24X24_ALT1_H) || defined (SYMBOLS_24X24_ALT2_H) + #define SYMBOLS_SELECTED +#endif +#if defined (SYMBOLS_24X24_HF) || defined (SYMBOLS_24X24_OLD_HF) || defined (SYMBOLS_24X24_ALT1_HF) || defined (SYMBOLS_24X24_ALT2_HF) + #define SYMBOLS_SELECTED +#endif +#if defined (SYMBOLS_24X24_VFP) || defined (SYMBOLS_24X24_OLD_VFP) || defined (SYMBOLS_24X24_ALT1_VFP) || defined (SYMBOLS_24X24_ALT2_VFP) + #define SYMBOLS_SELECTED +#endif +#if defined (SYMBOLS_24X24_VP_F) || defined (SYMBOLS_24X24_OLD_VP_F) || defined (SYMBOLS_24X24_ALT1_VP_F) || defined (SYMBOLS_24X24_ALT2_VP_F) + #define SYMBOLS_SELECTED +#endif +#if defined (SYMBOLS_30X32_HF) || defined (SYMBOLS_30X32_OLD_HF) || defined (SYMBOLS_30X32_ALT1_HF) || defined (SYMBOLS_30X32_ALT2_HF) + #define SYMBOLS_SELECTED +#endif +#if defined (SYMBOLS_32X32_HF) || defined (SYMBOLS_32X32_OLD_HF) || defined (SYMBOLS_32X32_ALT1_HF) || defined (SYMBOLS_32X32_ALT2_HF) + #define SYMBOLS_SELECTED +#endif +#if defined (SYMBOLS_32X39_HF) + #define SYMBOLS_SELECTED +#endif + + +/* fancy pinout requires graphic display and symbol set */ +#ifdef SW_SYMBOLS + + /* graphic display */ + #ifndef LCD_GRAPHIC + #undef SW_SYMBOLS + #endif + + /* symbol set */ + #ifndef SYMBOLS_SELECTED + #undef SW_SYMBOLS + #endif + +#endif + + +/* additional component symbols */ +#if defined (SW_UJT) || defined (UI_QUESTION_MARK) || defined (UI_ZENER_DIODE) || defined (UI_QUARTZ_CRYSTAL) + #ifndef SYMBOLS_EXTRA + #define SYMBOLS_EXTRA + #endif +#endif + + +/* options which require component symbols / fancy pinout */ +#ifndef SW_SYMBOLS + + /* question mark symbol */ + #ifdef UI_QUESTION_MARK + #undef UI_QUESTION_MARK + #endif + + /* Zener diode symbol */ + #ifdef UI_ZENER_DIODE + #undef UI_ZENER_DIODE + #endif + + /* quartz crystal symbol */ + #ifdef UI_QUARTZ_CRYSTAL + #undef UI_QUARTZ_CRYSTAL + #endif + + /* disabling text pinout */ + #ifdef UI_NO_TEXTPINOUT + #undef UI_NO_TEXTPINOUT + #endif + + /* test-output of component symbols */ + #ifdef SW_SYMBOL_TEST + #undef SW_SYMBOL_TEST + #endif + +#endif + + +/* PWM generators: can't have both variants */ +#if defined (SW_PWM_SIMPLE) && defined (SW_PWM_PLUS) + #error <<< Select either PWM generator with simple UI or fancy UI! >>> +#endif + + +/* frequency counter */ +#if defined (HW_FREQ_COUNTER_BASIC) || defined (HW_FREQ_COUNTER_EXT) + #define HW_FREQ_COUNTER +#endif + + +/* ring tester */ +#if defined (HW_RING_TESTER) + /* requires pulse output */ + #if ! defined (RING_TESTER_PIN) && ! defined (RING_TESTER_PROBES) + #error <<< Select pulse output for ring tester! >>> + #endif + /* prefer dedicated pin */ + #if defined (RING_TESTER_PIN) && defined (RING_TESTER_PROBES) + #undef RING_TESTER_PROBES + #endif +#endif + + +/* IR detector/decoder: can't have probes and dedicated pin */ +#if defined (SW_IR_RECEIVER) && defined (HW_IR_RECEIVER) + #error <<< Select either probes or dedicated IO pin for IR detector! >>> +#endif + + +/* rounding for DS18B20 requires DS18B20 support */ +#ifdef UI_ROUND_DS18B20 + #ifndef SW_DS18B20 + #undef UI_ROUND_DS18B20 + #endif +#endif + + +/* Zener check: can't have unswitched and switched mode */ +#if defined (ZENER_UNSWITCHED) && defined (ZENER_SWITCHED) + #error <<< Select either unswitched or switched mode for Zener check! >>> +#endif + + +/* Zener check, switched mode: boost converter drive methods */ +#ifdef ZENER_SWITCHED + + /* can't have high and low active */ + #if defined (ZENER_BOOST_HIGH) && defined (ZENER_BOOST_LOW) + #error <<< Select either high or low active for boost converter! >>> + #endif + + /* must have one drive method */ + #if ! defined (ZENER_BOOST_HIGH) && ! defined (ZENER_BOOST_LOW) + #error <<< Select drive method for boost converter! >>> + #endif + +#endif + + +/* Zener check during normal probing requires unswitched or switched mode */ +#ifdef HW_PROBE_ZENER + #if ! defined (ZENER_UNSWITCHED) && ! defined (ZENER_SWITCHED) + #undef HW_PROBE_ZENER + #endif +#endif + + +/* read functions for display require bus with read support enabled */ +#ifdef LCD_READ + #if defined (LCD_SPI) && ! defined (SPI_RW) + #undef LCD_READ + #endif + #if defined (LCD_I2C) && ! defined (I2C_RW) + #undef LCD_READ + #endif + /* can't check parallel busses */ +#endif + +/* display ID requires read functions for display */ +#ifdef SW_DISPLAY_ID + #ifndef LCD_READ + #undef SW_DISPLAY_ID + #endif +#endif + +/* output of display registers requires read functions for display + and serial output */ +#ifdef SW_DISPLAY_REG + #ifndef LCD_READ + #undef SW_DISPLAY_REG + #endif + #ifndef UI_SERIAL_COPY + #undef SW_DISPLAY_REG + #endif +#endif + + + +/* ************************************************************************ + * simplify ifdefs + * ************************************************************************ */ + + +/* ProbePinout() */ +#if defined (SW_PWM_SIMPLE) || defined (SW_PWM_PLUS) || defined (SW_SQUAREWAVE) || defined (SW_SERVO) + #ifndef FUNC_PROBE_PINOUT + #define FUNC_PROBE_PINOUT + #endif +#endif + +#if defined (SW_ESR_TOOL) || defined (SW_CONTINUITY_CHECK) + #ifndef FUNC_PROBE_PINOUT + #define FUNC_PROBE_PINOUT + #endif +#endif + +#if defined (SW_MONITOR_R) || defined (SW_MONITOR_C) || defined (SW_MONITOR_L) || defined(SW_MONITOR_RCL) || defined(SW_MONITOR_RL) + #ifndef FUNC_PROBE_PINOUT + #define FUNC_PROBE_PINOUT + #endif +#endif + +#if defined (HW_RING_TESTER) && defined (RING_TESTER_PROBES) + #ifndef FUNC_PROBE_PINOUT + #define FUNC_PROBE_PINOUT + #endif +#endif + + +/* E6 norm values */ +#if defined (SW_C_E6_T) || defined (SW_L_E6_T) + #define SW_E6 +#endif + +/* E12 norm values */ +#if defined (SW_C_E12_T) || defined (SW_L_E12_T) + #define SW_E12 +#endif + +/* E24 norm values */ +#if defined (SW_R_E24_5_T) || defined (SW_R_E24_5_CC) || defined (SW_R_E24_1_T) || defined (SW_R_E24_1_CC) + #define SW_E24 +#endif + +/* E96 norm values */ +#if defined (SW_R_E96_T) || defined (SW_R_E96_CC) || defined (SW_R_E96_EIA96) + #define SW_E96 +#endif + + +/* Show_ENormValues(), Display_EValue() */ +#if defined (SW_R_E24_5_T) || defined (SW_R_E24_1_T) || defined (SW_R_E96_T) + #ifndef FUNC_EVALUE + #define FUNC_EVALUE + #endif + #ifndef SW_R_EXX + #define SW_R_EXX + #endif +#endif + +#if defined (SW_C_E6_T) || defined (SW_C_E12_T) || defined (SW_L_E6_T) || defined (SW_L_E12_T) + #ifndef FUNC_EVALUE + #define FUNC_EVALUE + #endif +#endif + + +/* Show_ENormCodes(), Display_ColorCode() */ +#if defined (SW_R_E24_5_CC) || defined (SW_R_E24_1_CC) || defined (SW_R_E96_CC) + #ifndef FUNC_COLORCODE + #define FUNC_COLORCODE + #endif + #ifndef SW_R_EXX + #define SW_R_EXX + #endif +#endif + + +/* Show_ENormEIA96(), Display_EIA96() */ +#if defined (SW_R_E96_EIA96) + #ifndef FUNC_EIA96 + #define FUNC_EIA96 + #endif + #ifndef SW_R_EXX + #define SW_R_EXX + #endif +#endif + + +/* SmoothLongKeyPress() */ +#if defined (SW_PWM_PLUS) || defined (SW_SERVO) || defined (HW_EVENT_COUNTER) || defined (HW_LC_METER) + #ifndef FUNC_SMOOTHLONGKEYPRESS + #define FUNC_SMOOTHLONGKEYPRESS + #endif +#endif + + +/* Display_FullValue() */ +#if defined (SW_SQUAREWAVE) || defined (SW_PWM_PLUS) || defined (HW_FREQ_COUNTER_EXT) || defined (SW_SERVO) + #ifndef FUNC_DISPLAY_FULLVALUE + #define FUNC_DISPLAY_FULLVALUE + #endif +#endif + +#if defined (HW_EVENT_COUNTER) || defined (SW_DHTXX) || defined (LC_METER_SHOW_FREQ) || defined (HW_MAX6675) + #ifndef FUNC_DISPLAY_FULLVALUE + #define FUNC_DISPLAY_FULLVALUE + #endif +#endif + +#if defined (FUNC_EVALUE) || defined (FUNC_COLORCODE) || defined (FUNC_EIA96) + #ifndef FUNC_DISPLAY_FULLVALUE + #define FUNC_DISPLAY_FULLVALUE + #endif +#endif + + +/* Display_SignedFullValue() */ +#if defined (SW_DS18B20) || defined (SW_DHTXX) || defined (HW_MAX31855) + #ifndef FUNC_DISPLAY_SIGNEDFULLVALUE + #define FUNC_DISPLAY_SIGNEDFULLVALUE + #endif +#endif + + +/* Display_HexByte() */ +#if defined (SW_IR_RECEIVER) || defined (HW_IR_RECEIVER) || defined (ONEWIRE_READ_ROM) || defined (SW_ONEWIRE_SCAN) + #ifndef FUNC_DISPLAY_HEXBYTE + #define FUNC_DISPLAY_HEXBYTE + #endif +#endif + +#if defined (SW_FONT_TEST) || defined (SW_SYMBOL_TEST) || defined (SW_DISPLAY_REG) + #ifndef FUNC_DISPLAY_HEXBYTE + #define FUNC_DISPLAY_HEXBYTE + #endif +#endif + + +/* Display_HexValue() */ +#if defined (SW_IR_TRANSMITTER) || defined (SW_DISPLAY_ID) + #ifndef FUNC_DISPLAY_HEXVALUE + #define FUNC_DISPLAY_HEXVALUE + #endif +#endif + + +/* Celsius2Fahrenheit() */ +#ifdef UI_FAHRENHEIT + #if defined (SW_DS18B20) || defined (SW_DHTXX) || defined (HW_MAX6675) || defined (HW_MAX31855) + #ifndef FUNC_CELSIUS2FAHRENHEIT + #define FUNC_CELSIUS2FAHRENHEIT + #endif + #endif +#endif + + +/* variable Start_str */ +#if defined (SW_OPTO_COUPLER) || defined (HW_EVENT_COUNTER) || defined (SW_DS18B20) || defined (SW_ONEWIRE_SCAN) + #ifndef VAR_START_STR + #define VAR_START_STR + #endif +#endif + +#if defined (SW_DHTXX) || defined (HW_MAX6675) || defined (HW_MAX31855) + #ifndef VAR_START_STR + #define VAR_START_STR + #endif +#endif + + +/* Display_ColoredEEString_Center() */ +#if defined (TOUCH_ADS7843) && defined (UI_COLORED_TITLES) && defined (UI_CENTER_ALIGN) + #ifndef FUNC_DISPLAY_COLOREDEESTRING_CENTER + #define FUNC_DISPLAY_COLOREDEESTRING_CENTER + #endif +#endif + + + +/* ************************************************************************ + * EOF + * ************************************************************************ */ diff --git a/firmware/display.c b/firmware/display.c index 7e90f40..2c82681 100644 --- a/firmware/display.c +++ b/firmware/display.c @@ -197,18 +197,64 @@ void Display_Char(unsigned char Char) void Display_EEString(const unsigned char *String) { - unsigned char Char; + unsigned char Char; /* character */ /* read characters until we get the terminating 0 */ while ((Char = DATA_read_byte(String))) { - Display_Char(Char); /* send character */ - String++; /* next one */ + Display_Char(Char); /* send character */ + String++; /* next one */ } } +#ifdef UI_CENTER_ALIGN + +/* + * display a fixed string stored in EEPROM/Flash center-aligned + * + * requires: + * - pointer to fixed string + */ + +void Display_EEString_Center(const unsigned char *String) +{ + uint8_t Length = 0; /* string length */ + uint8_t n; /* temporary value */ + const unsigned char *TempStr; /* string pointer */ + + /* get string length */ + TempStr = String; + /* read characters until we get the terminating 0 */ + while ((n = DATA_read_byte(TempStr))) + { + Length++; /* got one character */ + TempStr++; /* next one */ + } + + /* calculate start position */ + n = UI.CharMax_X; /* get line size */ + if (n >= Length) /* sanity check */ + { + n -= Length; /* free space */ + n /= 2; /* left half */ + n++; /* position start at 1 */ + } + else /* string too long */ + { + n = 1; /* left-aligned */ + } + + /* display string in center of line */ + LCD_CharPos(n, UI.CharPos_Y); /* move cursor to start position */ + Display_EEString(String); /* display string */ +} + +#endif + + + /* ************************************************************************ * convenience functions to save some bytes of flash memory * ************************************************************************ */ @@ -341,6 +387,26 @@ void Display_NL_EEString(const unsigned char *String) +#ifdef UI_CENTER_ALIGN + +/* + * move to the next line and + * display a fixed string stored in EEPROM center-aligned + * + * requires: + * - pointer to fixed string + */ + +void Display_NL_EEString_Center(const unsigned char *String) +{ + Display_NextLine(); + Display_EEString_Center(String); /* display string */ +} + +#endif + + + /* * move to the next line and * display a fixed string stored in EEPROM followed by a space @@ -510,18 +576,98 @@ void Display_ColoredEEString_Space(const unsigned char *String, uint16_t Color) void Display_UseTitleColor(void) { - UI.PenColor = COLOR_TITLE; /* set pen color */ + UI.OldColor = UI.PenColor; /* save current color */ + UI.PenColor = COLOR_TITLE; /* set new pen color */ } +#endif + + +#if defined (UI_COLORED_TITLES) || defined (UI_COLORED_VALUES) /* - * set pen color to COLOR_PEN + * reset pen color to old color */ -void Display_UsePenColor(void) +void Display_UseOldColor(void) { - UI.PenColor = COLOR_PEN; /* reset pen color */ + UI.PenColor = UI.OldColor; /* reset pen color */ +} + +#endif + + + +#ifdef UI_COLORED_VALUES + +/* + * set pen color to COLOR_VALUE + */ + +void Display_UseValueColor(void) +{ + UI.OldColor = UI.PenColor; /* save current color */ + UI.PenColor = COLOR_VALUE; /* set new pen color */ +} + +#endif + + + +#ifdef UI_CENTER_ALIGN + +/* + * set text line to vertical center + * + * requires: + * - Lines: number of lines for text block + */ + +void Display_CenterLine(uint8_t Lines) +{ + uint8_t n; + + n = UI.CharMax_Y; /* get max number of lines */ + if (n > Lines) /* sanity check */ + { + n -= Lines; /* free lines */ + n /= 2; /* first half */ + n++; /* lines start at #1 */ + } + else /* block too large */ + { + n = 1; /* line #1 */ + } + + LCD_CharPos(1, n); /* set new line */ +} + +#endif + + + +#ifdef FUNC_DISPLAY_COLOREDEESTRING_CENTER + +/* + * display a fixed string stored in EEPROM center-aligned + * using a specific color + * + * requires: + * - pointer to fixed string + * - color + */ + +void Display_ColoredEEString_Center(const unsigned char *String, uint16_t Color) +{ + uint16_t OldColor; + + OldColor = UI.PenColor; /* get current color */ + UI.PenColor = Color; /* set new color */ + + Display_EEString_Center(String); /* display string */ + + UI.PenColor = OldColor; /* reset color to old one */ } #endif @@ -567,7 +713,15 @@ void Display_HexDigit(uint8_t Digit) #endif } + #ifdef UI_COLORED_VALUES + Display_UseValueColor(); /* set value color */ + #endif + Display_Char(Digit); /* display digit */ + + #ifdef UI_COLORED_VALUES + Display_UseOldColor(); /* reset pen color */ + #endif } #endif @@ -659,6 +813,10 @@ void Display_FullValue(uint32_t Value, uint8_t DecPlaces, unsigned char Unit) uint8_t Length; /* string length */ uint8_t Pos = 0; /* position of dot */ + #ifdef UI_COLORED_VALUES + Display_UseValueColor(); /* set value color */ + #endif + /* convert value into string */ ultoa(Value, OutBuffer, 10); /* radix 10: max. 10 chars + /0 */ Length = strlen(OutBuffer); /* get string length */ @@ -704,6 +862,10 @@ void Display_FullValue(uint32_t Value, uint8_t DecPlaces, unsigned char Unit) n++; /* next digit */ } + #ifdef UI_COLORED_VALUES + Display_UseOldColor(); /* reset pen color */ + #endif + /* display unit */ if (Unit) Display_Char(Unit); } @@ -729,7 +891,16 @@ void Display_SignedFullValue(int32_t Value, uint8_t DecPlaces, unsigned char Uni /* take care about sign */ if (Value < 0) /* negative value */ { + #ifdef UI_COLORED_VALUES + Display_UseValueColor(); /* set value color */ + #endif + Display_Minus(); /* display: "-" */ + + #ifdef UI_COLORED_VALUES + Display_UseOldColor(); /* reset pen color */ + #endif + Value = -Value; /* make value positive */ } @@ -796,6 +967,10 @@ void Display_Value(uint32_t Value, int8_t Exponent, unsigned char Unit) * display value */ + #ifdef UI_COLORED_VALUES + Display_UseValueColor(); /* set value color */ + #endif + /* convert value into string */ utoa((uint16_t)Value, OutBuffer, 10); /* radix 10: max. 5 chars + /0 */ Length = strlen(OutBuffer); /* get string length */ @@ -844,6 +1019,10 @@ void Display_Value(uint32_t Value, int8_t Exponent, unsigned char Unit) Index++; /* next one */ } + #ifdef UI_COLORED_VALUES + Display_UseOldColor(); /* reset pen color */ + #endif + /* display prefix and unit */ if (Prefix) Display_Char(Prefix); if (Unit) Display_Char(Unit); @@ -867,7 +1046,16 @@ void Display_SignedValue(int32_t Value, int8_t Exponent, unsigned char Unit) /* take care about sign */ if (Value < 0) /* negative value */ { + #ifdef UI_COLORED_VALUES + Display_UseValueColor(); /* set value color */ + #endif + Display_Minus(); /* display: "-" */ + + #ifdef UI_COLORED_VALUES + Display_UseOldColor(); /* reset pen color */ + #endif + Value = -Value; /* make value positive */ } @@ -949,8 +1137,17 @@ void Display_EIA96(uint8_t Index, int8_t Scale) if (Index < 10) /* single digit */ { + #ifdef UI_COLORED_VALUES + Display_UseValueColor(); /* set value color */ + #endif + Display_Char('0'); /* display: 0 */ + + #ifdef UI_COLORED_VALUES + Display_UseOldColor(); /* reset pen color */ + #endif } + Display_FullValue(Index, 0, 0); /* display index number */ @@ -972,7 +1169,15 @@ void Display_EIA96(uint8_t Index, int8_t Scale) /* read multiplier code */ MultCode = DATA_read_byte(&EIA96_Mult_table[n]); + #ifdef UI_COLORED_VALUES + Display_UseValueColor(); /* set value color */ + #endif + Display_Char(MultCode); /* display multiplier code */ + + #ifdef UI_COLORED_VALUES + Display_UseOldColor(); /* reset pen color */ + #endif } #endif diff --git a/firmware/functions.h b/firmware/functions.h index 4dd62e4..c1a26d5 100644 --- a/firmware/functions.h +++ b/firmware/functions.h @@ -232,6 +232,9 @@ extern void Display_Char(unsigned char Char); #endif extern void Display_EEString(const unsigned char *String); + #ifdef UI_CENTER_ALIGN + extern void Display_EEString_Center(const unsigned char *String); + #endif extern void Display_ProbeNumber(uint8_t Probe); extern void Display_SemiPinDesignator(uint8_t Probe); @@ -240,6 +243,9 @@ extern void Display_Colon(void); extern void Display_EEString_Space(const unsigned char *String); extern void Display_NL_EEString(const unsigned char *String); + #ifdef UI_CENTER_ALIGN + extern void Display_NL_EEString_Center(const unsigned char *String); + #endif extern void Display_NL_EEString_Space(const unsigned char *String); extern void LCD_ClearLine2(void); @@ -263,7 +269,22 @@ extern void Display_ColoredEEString(const unsigned char *String, uint16_t Color); extern void Display_ColoredEEString_Space(const unsigned char *String, uint16_t Color); extern void Display_UseTitleColor(void); - extern void Display_UsePenColor(void); + #endif + + #ifdef UI_CENTER_ALIGN + extern void Display_CenterLine(uint8_t Lines); + #endif + + #ifdef FUNC_DISPLAY_COLOREDEESTRING_CENTER + extern void Display_ColoredEEString_Center(const unsigned char *String, uint16_t Color); + #endif + + #if defined (UI_COLORED_TITLES) || defined (UI_COLORED_VALUES) + extern void Display_UseOldColor(void); + #endif + + #ifdef UI_COLORED_VALUES + extern void Display_UseValueColor(void); #endif #if defined (FUNC_DISPLAY_HEXBYTE) || defined (FUNC_DISPLAY_HEXVALUE) @@ -380,6 +401,10 @@ uint32_t Value2, int8_t Scale2); extern uint32_t RescaleValue(uint32_t Value, int8_t Scale, int8_t NewScale); + #ifdef SW_R_TRIMMER + extern int8_t NormalizeValue(uint32_t Value1, int8_t Scale1, uint32_t Value2, int8_t Scale2); + #endif + #ifdef UI_ROUND_DS18B20 extern int32_t RoundSignedValue(int32_t Value, uint8_t Scale, uint8_t RoundScale); #endif diff --git a/firmware/main.c b/firmware/main.c index 863cdd9..5945dae 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -434,13 +434,20 @@ void Show_ENormEIA96(uint32_t Value, int8_t Scale) /* * show failed test + * - no component found */ void Show_Fail(void) { /* display info */ - Display_EEString(Failed1_str); /* display: No component */ - Display_NL_EEString(Failed2_str); /* display: found! */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(2); /* center block: 2 lines */ + Display_EEString_Center(Failed1_str); /* display: No component */ + Display_NL_EEString_Center(Failed2_str); /* display: found! */ + #else + Display_EEString(Failed1_str); /* display: No component */ + Display_NL_EEString(Failed2_str); /* display: found! */ + #endif #ifdef UI_QUESTION_MARK /* display question mark symbol */ @@ -463,6 +470,7 @@ void Show_Error() { if (Check.Type == TYPE_DISCHARGE) /* discharge failed */ { + /* possibly a voltage source */ Display_EEString(DischargeFailed_str); /* display: Battery? */ /* display probe number and remaining voltage */ @@ -666,7 +674,7 @@ void Show_Resistor(void) } #ifdef UI_COLORED_TITLES - Display_UsePenColor(); /* use pen color */ + Display_UseOldColor(); /* use old color */ #endif @@ -684,6 +692,32 @@ void Show_Resistor(void) { Display_Space(); Display_Value(R2->Value, R2->Scale, LCD_CHAR_OMEGA); + + #ifdef SW_R_TRIMMER + /* potentiometer/trimpot */ + uint32_t R_Value; /* value of R1 */ + uint32_t Rt_Value; /* value of R_t */ + int8_t Scale; /* scale of R1 and R_t */ + + /* normalize R1 and R2 */ + Scale = NormalizeValue(R1->Value, R1->Scale, R2->Value, R2->Scale); + R_Value = RescaleValue(R1->Value, R1->Scale, Scale); /* normalized R1 */ + Rt_Value = RescaleValue(R2->Value, R2->Scale, Scale); /* normalized R2 */ + + Rt_Value += R_Value; /* R2 + R1 */ + if (Rt_Value > 0) /* sanity check */ + { + /* show sum: R1 + R2 */ + Display_NL_EEString_Space(R_t_str); /* display: R_t */ + Display_Value(Rt_Value, Scale, LCD_CHAR_OMEGA); /* display sum */ + + /* show ratio (in %): R1 / (R1 + R2) */ + Display_NL_EEString_Space(r_R1_str); /* display: R1 */ + R_Value *= 100; /* for % */ + R_Value /= Rt_Value; /* R1 / (R1 + R2) */ + Display_Value(R_Value, 0, '%'); /* display ratio in % */ + } + #endif } #ifdef SW_INDUCTOR else /* single resistor */ @@ -840,7 +874,7 @@ void Show_Capacitor(void) Display_ProbeNumber(MaxCap->B); /* display pin #2 */ #ifdef UI_COLORED_TITLES - Display_UsePenColor(); /* use pen color */ + Display_UseOldColor(); /* use old color */ #endif @@ -871,12 +905,21 @@ void Show_Capacitor(void) * display additional stuff */ - /* display discharge leakage current in next line */ - if (MaxCap->I_leak > 0) + /* display self-discharge equivalent leakage current */ + if (MaxCap->I_leak_Value > 0) /* got value */ { Display_NL_EEString_Space(I_leak_str); - Display_Value(MaxCap->I_leak, -8, 'A'); /* in 10nA */ + Display_Value(MaxCap->I_leak_Value, MaxCap->I_leak_Scale, 'A'); /* in A */ + } + + #ifdef SW_C_VLOSS + /* display self-discharge voltage loss in % */ + if (MaxCap->U_loss > 0) /* got value */ + { + Display_NL_EEString_Space(U_loss_str); + Display_Value(MaxCap->U_loss, -1, '%'); /* in 0.1% */ } + #endif #ifdef SW_C_E6_T /* show E series norm values for E6 20% */ @@ -1105,7 +1148,7 @@ void Show_Diode(void) } #ifdef UI_COLORED_TITLES - Display_UsePenColor(); /* use pen color */ + Display_UseOldColor(); /* use old color */ #endif @@ -1507,6 +1550,7 @@ void Show_BJT(void) * Schottky transistor / Schottky-clamped BJT * - V_BC of a Germanium BJT is as low as V_f of a Schottky diode. * So we check only Silicon BJTs. + * - display V_f of clamping diode */ /* check for Si BJT */ @@ -1530,7 +1574,7 @@ void Show_BJT(void) #ifdef UI_SERIAL_COMMANDS /* set data for remote commands */ Info.Flags |= INFO_BJT_SCHOTTKY; /* Schottky-clamped BJT */ -// Info.Comp2 = Diode; /* link diode */ + Info.Comp2 = Diode; /* link clamping diode */ #endif } } @@ -1744,7 +1788,7 @@ void Show_FET(void) if (Check.Type & TYPE_MOSFET) Show_FET_Mode(); #ifdef UI_COLORED_TITLES - Display_UsePenColor(); /* use pen color */ + Display_UseOldColor(); /* use old color */ #endif @@ -1811,7 +1855,7 @@ void Show_IGBT(void) Show_FET_Mode(); /* display mode */ #ifdef UI_COLORED_TITLES - Display_UsePenColor(); /* use pen color */ + Display_UseOldColor(); /* use old color */ #endif #ifndef UI_NO_TEXTPINOUT @@ -2074,12 +2118,23 @@ void PowerOff(void) #ifdef LCD_COLOR UI.PenColor = COLOR_INFO; /* set pen color */ #endif - Display_EEString(Bye_str); /* display: Bye! */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(1); /* center block: 1 line */ + Display_EEString_Center(Bye_str); /* display: Bye! */ + #else + Display_EEString(Bye_str); /* display: Bye! */ + #endif + /* disable stuff */ cli(); /* disable interrupts */ wdt_disable(); /* disable watchdog */ + + /* power down */ #ifdef POWER_SWITCH_SOFT - POWER_PORT &= ~(1 << POWER_CTRL); /* power off myself */ + POWER_PORT &= ~(1 << POWER_CTRL); /* power off myself: set pin low */ + #ifdef PASSIVE_POWER_CTRL + POWER_DDR |= (1 << POWER_CTRL); /* set pin to output mode */ + #endif #endif /* @@ -2245,9 +2300,14 @@ int main(void) */ #ifdef POWER_SWITCH_SOFT - /* switch on power to keep me alive */ - POWER_DDR = (1 << POWER_CTRL); /* set pin as output */ - POWER_PORT = (1 << POWER_CTRL); /* set pin to drive power management transistor */ + #ifdef PASSIVE_POWER_CTRL + /* switch on power to keep me alive (passive way) */ + /* pin in input mode and low by default */ + #else + /* switch on power to keep me alive (standard way) */ + POWER_DDR = (1 << POWER_CTRL); /* set pin as output */ + POWER_PORT = (1 << POWER_CTRL); /* set pin high to drive power management transistor */ + #endif #endif /* set up MCU */ @@ -2332,7 +2392,7 @@ int main(void) /* * watchdog was triggered (timeout 2s) - * - This is after the MCU done a reset driven by the watchdog. + * - This is after the MCU has performed a reset driven by the watchdog. * - Does only work if the capacitor at the base of the power management * transistor is large enough to survive a MCU reset. Otherwise the * tester simply loses power. @@ -2340,17 +2400,32 @@ int main(void) if (Test) { - /* Display was initialized before but some global variables in the driver - might be zeroed. Drivers with line tracking won't clear screen. */ + /* + * inform user + * - Display was initialized before but some global variables in the + * driver might be zeroed. Drivers with line tracking won't clear screen. + */ + LCD_Clear(); /* clear display */ #ifdef LCD_COLOR UI.PenColor = COLOR_ERROR; /* set pen color */ #endif - Display_EEString(Timeout_str); /* display: timeout */ - Display_NL_EEString(Error_str); /* display: error */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(2); /* center block: 2 lines */ + Display_EEString_Center(Timeout_str); /* display: timeout */ + Display_NL_EEString_Center(Error_str); /* display: error */ + #else + Display_EEString(Timeout_str); /* display: timeout */ + Display_NL_EEString(Error_str); /* display: error */ + #endif MilliSleep(2000); /* give user some time to read */ + + /* power down */ #ifdef POWER_SWITCH_SOFT - POWER_PORT &= ~(1 << POWER_CTRL); /* power off myself */ + POWER_PORT &= ~(1 << POWER_CTRL); /* power off myself: set pin low */ + #ifdef PASSIVE_POWER_CTRL + POWER_DDR |= (1 << POWER_CTRL); /* set pin to output mode */ + #endif #elif defined (POWER_SWITCH_MANUAL) /* enter sleep mode to prevent any further action */ /* user should power off tester */ @@ -2441,9 +2516,21 @@ int main(void) */ #ifdef HW_BUZZER - /* set up port pin for buzzer control */ - BUZZER_PORT &= ~(1 << BUZZER_CTRL); /* off by default */ - BUZZER_DDR |= (1 << BUZZER_CTRL); /* enable output */ + /* set up port pin for buzzer control: off by default */ + BUZZER_PORT &= ~(1 << BUZZER_CTRL); /* set pin low */ + BUZZER_DDR |= (1 << BUZZER_CTRL); /* enable output */ + #endif + + #ifdef ZENER_SWITCHED + /* set up port pin for boost converter control: off by default */ + #ifdef ZENER_BOOST_HIGH + /* high active */ + BOOST_PORT &= ~(1 << BOOST_CTRL); /* set pin low */ + #else + /* low active */ + BOOST_PORT |= (1 << BOOST_CTRL); /* set pin high */ + #endif + BOOST_DDR |= (1 << BOOST_CTRL); /* enable output */ #endif @@ -2475,8 +2562,14 @@ int main(void) Display_Serial_On(); /* enable serial output & NL */ #endif - Display_EEString(Tester_str); /* display: Component Tester */ - Display_NL_EEString(Version_str); /* display firmware version */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(2); /* center block: 2 lines */ + Display_EEString_Center(Tester_str); /* display: Component Tester */ + Display_NL_EEString_Center(Version_str); /* display firmware version */ + #else + Display_EEString(Tester_str); /* display: Component Tester */ + Display_NL_EEString(Version_str); /* display firmware version */ + #endif #ifdef SW_DISPLAY_ID /* show ID of display controller */ @@ -2528,7 +2621,12 @@ int main(void) if (Test == 0) /* error */ { LCD_ClearLine2(); - Display_EEString(Error_str); /* display: Error */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(1); /* center block: 1 line */ + Display_EEString_Center(Error_str); /* display: Error */ + #else + Display_EEString(Error_str); /* display: Error */ + #endif MilliSleep(1000); /* smooth UI */ TestKey(2500, CURSOR_BLINK | CHECK_OP_MODE | CHECK_BAT); } @@ -2613,12 +2711,12 @@ int main(void) #ifdef BAT_NONE /* no battery monitoring */ - Display_EEString(Tester_str); /* display: Component Tester */ + Display_EEString(Tester_str); /* display (line #1): Component Tester */ #else /* battery monitoring */ CheckBattery(); /* check battery voltage */ /* will power off on low battery */ - ShowBattery(); /* display battery status */ + ShowBattery(); /* display (line #1) battery status */ #endif @@ -2636,7 +2734,15 @@ int main(void) #endif /* display start of probing */ - Display_NL_EEString(Probing_str); /* display: probing... */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(1); /* center block: 1 line */ + /* move text left by one char for optional ' C' */ + UI.CharMax_X--; /* simulate shorter line */ + Display_EEString_Center(Probing_str); /* display: probing... */ + UI.CharMax_X++; /* original line size */ + #else + Display_NL_EEString(Probing_str); /* display (line #2): probing... */ + #endif /* try to discharge any connected component */ DischargeProbes(); @@ -2719,6 +2825,13 @@ int main(void) } #endif + #ifdef UI_PROBING_DONE_BEEP + /* buzzer: short beep for probing result (probing done) */ + BUZZER_PORT |= (1 << BUZZER_CTRL); /* enable: set pin high */ + MilliSleep(20); /* wait for 20 ms */ + BUZZER_PORT &= ~(1 << BUZZER_CTRL); /* disable: set pin low */ + #endif + /* call output function based on component type */ switch (Check.Found) { diff --git a/firmware/probes.c b/firmware/probes.c index 5d856da..5dcac66 100644 --- a/firmware/probes.c +++ b/firmware/probes.c @@ -313,6 +313,7 @@ void DischargeProbes(void) uint8_t Limit = 40; /* sliding timeout (2s) */ uint8_t ID; /* test pin */ uint8_t Flags; /* discharge state flags */ + uint8_t Channel; /* ADC MUX channel */ uint16_t U_c; /* current voltage */ uint16_t U_old[3]; /* old voltages */ @@ -347,6 +348,9 @@ void DischargeProbes(void) * is also connected via its probe resistors to Gnd. In case of a battery * it's not the battery's voltage. Therefore we measure the unloaded * voltage later on when we encounter a discharge problem. + * - The protection relay option comes in two variants, i.e. probes shorted + * directly or via resistors. So we dont't use it here to keep things + * simple. */ /* reset variables */ @@ -363,7 +367,9 @@ void DischargeProbes(void) if (Flags & (1 << ID)) /* skip discharged probe */ continue; - U_c = ReadU(ID); /* get voltage of probe */ + /* get voltage at probe */ + Channel = DATA_read_byte(&Channel_table[ID]); /* update ADC channel */ + U_c = ReadU(Channel); /* get voltage */ if (U_c < U_old[ID]) /* voltage decreased */ { @@ -412,7 +418,7 @@ void DischargeProbes(void) ADC_DDR &= ~Flags; /* remove direct pull-down */ Flags = DATA_read_byte(&Rh_table[ID]) | DATA_read_byte(&Rl_table[ID]); R_DDR &= ~Flags; /* disable load resistors */ - Check.U = ReadU(ID); /* get and save voltage */ + Check.U = ReadU(Channel); /* get and save voltage */ Counter = 0; /* end loop */ } @@ -941,8 +947,8 @@ void CheckProbes(uint8_t Probe1, uint8_t Probe2, uint8_t Probe3) ADC_PORT = Probes.Pin_1; /* pull up emitter directly */ wait5ms(); R_DDR = Probes.Rl_2 | Probes.Rl_3; /* pull down base via Rl */ - U_1 = ReadU_5ms(Probe2); /* get voltage at collector */ - + U_1 = ReadU_5ms(Probes.Ch_2); /* get voltage at collector */ + /* * If DUT is conducting we might have a PNP BJT or p-channel FET. */ @@ -977,7 +983,7 @@ void CheckProbes(uint8_t Probe1, uint8_t Probe2, uint8_t Probe3) ADC_PORT = 0; /* pull down probe-2 directly */ R_DDR = Probes.Rl_1 | Probes.Rl_3; /* select Rl for probe-1 & Rl for probe-3 */ R_PORT = Probes.Rl_1 | Probes.Rl_3; /* pull up collector & base via Rl */ - U_1 = ReadU_5ms(Probe1); /* get voltage at collector */ + U_1 = ReadU_5ms(Probes.Ch_1); /* get voltage at collector */ /* * If DUT is conducting we might have an NPN BJT, something similar or diff --git a/firmware/resistor.c b/firmware/resistor.c index 088a1ee..5d3ec35 100644 --- a/firmware/resistor.c +++ b/firmware/resistor.c @@ -2,7 +2,7 @@ * * resistor measurements * - * (c) 2012-2020 by Markus Reschke + * (c) 2012-2022 by Markus Reschke * based on code from Markus Frejek and Karl-Heinz Kübbeler * * ************************************************************************ */ @@ -314,7 +314,7 @@ void CheckResistor(void) R_DDR = Probes.Rh_2; /* pull down probe-2 via Rh */ U_Rh_L = ReadU_5ms(Probes.Ch_2); /* get voltage at Rh pulled down */ - /* if voltage breakdown is sufficient */ + /* check voltage breakdown to filter out other components */ if ((U_Rl_H >= 4400) || (U_Rh_H <= 97)) /* R >= 5.1k or R < 9.3k */ { if (U_Rh_H < 4972) /* R < 83.4M & prevent division by zero */ diff --git a/firmware/tools_misc.c b/firmware/tools_misc.c index eb02471..9e01792 100644 --- a/firmware/tools_misc.c +++ b/firmware/tools_misc.c @@ -122,7 +122,8 @@ void ProbePinout(uint8_t Mode) * - hardware option for voltage measurement of Zener diode * - uses dedicated analog input (TP_ZENER) with voltage divider * (default 10:1) - * - test push button enables boost converter + * - boost converter enabled by test push button (default) or + * dedicated I/O pin (switched mode) */ void Zener_Tool(void) @@ -183,6 +184,17 @@ void Zener_Tool(void) while (!(BUTTON_PIN & (1 << TEST_BUTTON))) /* as long as key is pressed */ { + #ifdef ZENER_SWITCHED + /* turn on boost converter */ + #ifdef ZENER_BOOST_HIGH + /* high active */ + BOOST_PORT |= (1 << BOOST_CTRL); /* set pin high */ + #else + /* low active */ + BOOST_PORT &= ~(1 << BOOST_CTRL); /* set pin low */ + #endif + #endif + /* get voltage (10:1 voltage divider) */ U1 = ReadU(TP_ZENER); /* read voltage (in mV) */ @@ -237,6 +249,17 @@ void Zener_Tool(void) } } + #ifdef ZENER_SWITCHED + /* turn off boost converter */ + #ifdef ZENER_BOOST_HIGH + /* high active */ + BOOST_PORT &= ~(1 << BOOST_CTRL); /* set pin low */ + #else + /* low active */ + BOOST_PORT |= (1 << BOOST_CTRL); /* set pin high */ + #endif + #endif + /* * user interface logic @@ -294,12 +317,13 @@ void Zener_Tool(void) #if defined (HW_ZENER) && defined (ZENER_UNSWITCHED) /* - * Zener tool (alternative mode) + * Zener tool (alternative mode: unswitched boost converter) * - hardware option for voltage measurement of Zener diode * or external voltage * - uses dedicated analog input (TP_ZENER) with voltage divider * (default 10:1) - * - boost converter runs all the time or circuit without boost converter + * - boost converter runs all the time or circuit without boost + * converter (just measuring external voltage) */ void Zener_Tool(void) @@ -383,7 +407,9 @@ void Zener_Tool(void) * or external voltage * - uses dedicated analog input (TP_ZENER) with voltage divider * (default 10:1) - * - boost converter runs all the time or circuit without boost converter + * - boost converter runs all the time, circuit without boost + * converter (just measuring external voltage), or boost converter + * switched by dedicated I/O pin */ void CheckZener(void) @@ -393,9 +419,32 @@ void CheckZener(void) uint32_t Value; /* value */ #endif + #ifdef ZENER_SWITCHED + /* turn on boost converter */ + #ifdef ZENER_BOOST_HIGH + /* high active */ + BOOST_PORT |= (1 << BOOST_CTRL); /* set pin high */ + #else + /* low active */ + BOOST_PORT &= ~(1 << BOOST_CTRL); /* set pin low */ + #endif + MilliSleep(300); /* time for stabilization */ + #endif + /* get voltage */ U1 = ReadU(TP_ZENER); /* read voltage (in mV) */ + #ifdef ZENER_SWITCHED + /* turn off boost converter */ + #ifdef ZENER_BOOST_HIGH + /* high active */ + BOOST_PORT &= ~(1 << BOOST_CTRL); /* set pin low */ + #else + /* low active */ + BOOST_PORT |= (1 << BOOST_CTRL); /* set pin high */ + #endif + #endif + #ifndef ZENER_DIVIDER_CUSTOM /* ADC pin is connected to a 10:1 voltage divider */ U1 *= 10; /* voltage (mV) */ diff --git a/firmware/user.c b/firmware/user.c index 616e057..c1ce5db 100644 --- a/firmware/user.c +++ b/firmware/user.c @@ -83,19 +83,20 @@ int8_t CmpValue(uint32_t Value1, int8_t Scale1, uint32_t Value2, int8_t Scale2) Len1 = NumberOfDigits(Value1) + Scale1; Len2 = NumberOfDigits(Value2) + Scale2; + /* pre-process */ if ((Value1 == 0) || (Value2 == 0)) /* special case */ { Flag = 10; /* perform direct comparison */ } else if (Len1 > Len2) /* more digits -> larger */ { - Flag = 1; + Flag = 1; /* first value is larger */ } else if (Len1 == Len2) /* same length */ { /* re-scale to longer value */ - Len1 -= Scale1; - Len2 -= Scale2; + Len1 -= Scale1; /* just number of digits */ + Len2 -= Scale2; /* just number of digits */ while (Len1 > Len2) /* up-scale Value #2 */ { @@ -115,14 +116,24 @@ int8_t CmpValue(uint32_t Value1, int8_t Scale1, uint32_t Value2, int8_t Scale2) } else /* less digits -> smaller */ { - Flag = -1; + Flag = -1; /* first value is smaller */ } - if (Flag == 10) /* perform direct comparison */ + /* direct comparison */ + if (Flag == 10) /* requested direct comparison */ { - if (Value1 > Value2) Flag = 1; - else if (Value1 < Value2) Flag = -1; - else Flag = 0; + if (Value1 > Value2) + { + Flag = 1; /* first value is larger */ + } + else if (Value1 < Value2) + { + Flag = -1; /* first value is smaller */ + } + else + { + Flag = 0; /* values are equal */ + } } return Flag; @@ -136,6 +147,9 @@ int8_t CmpValue(uint32_t Value1, int8_t Scale1, uint32_t Value2, int8_t Scale2) * requires: * - value and scale (*10^x) * - new scale (*10^x) + * + * returns: + * - rescaled value */ uint32_t RescaleValue(uint32_t Value, int8_t Scale, int8_t NewScale) @@ -163,6 +177,70 @@ uint32_t RescaleValue(uint32_t Value, int8_t Scale, int8_t NewScale) +#ifdef SW_R_TRIMMER + +/* + * normalize values + * - determine the most suitable scale factor + * + * requires: + * - value and scale (*10^x) of first value + * - value and scale (*10^x) of second value + * + * returns: + * - normalized scale + */ + +int8_t NormalizeValue(uint32_t Value1, int8_t Scale1, uint32_t Value2, int8_t Scale2) +{ + int8_t NewScale; /* return value */ + int8_t Len1, Len2; /* length */ + + /* determine virtual length */ + Len1 = NumberOfDigits(Value1) + Scale1; + Len2 = NumberOfDigits(Value2) + Scale2; + + /* determine best scale */ + if (Len1 > Len2) /* value #1 longer */ + { + NewScale = Scale1; /* use scale of value #1 */ + Len1 -= Scale1; /* just number of digits */ + if (Len1 > 4) /* more than 4 digits (>9999) */ + { + NewScale += (Len1 - 4); /* scale up to 4 digits */ + } + } + else if (Len2 > Len1) /* value #2 longer */ + { + NewScale = Scale2; /* use scale of value #2 */ + Len2 -= Scale2; /* just number of digits */ + if (Len2 > 4) /* more than 4 digits (>9999) */ + { + NewScale += (Len2 - 4); /* scale up to 4 digits */ + } + } + else /* same length */ + { + /* take scale of value with more digits */ + Len1 -= Scale1; /* just number of digits */ + Len2 -= Scale2; /* just number of digits */ + if (Len1 > Len2) /* value #1 has more digits */ + { + NewScale = Scale1; /* use scale of value #1 */ + } + else /* value #2 has more digits or same number */ + { + NewScale = Scale2; /* use scale of value #2 */ + } + } + + return NewScale; +} + +#endif + + + #ifdef UI_ROUND_DS18B20 /* @@ -1230,9 +1308,14 @@ uint8_t ShortCircuit(uint8_t Mode) { /* tell user what to do */ LCD_Clear(); - Display_EEString(String); /* display: Remove/Create */ - Display_NextLine(); - Display_EEString(ShortCircuit_str); /* display: short circuit! */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(2); /* center block: 2 lines */ + Display_EEString_Center(String); /* display: Remove/Create */ + Display_NL_EEString_Center(ShortCircuit_str); /* display: short circuit! */ + #else + Display_EEString(String); /* display: Remove/Create */ + Display_NL_EEString(ShortCircuit_str); /* display: short circuit! */ + #endif } /* wait until all probes are dis/connected */ @@ -1330,9 +1413,11 @@ uint8_t MenuTool(uint8_t Items, uint8_t Type, void *Menu[], unsigned char *Unit) #ifdef UI_COLORED_TITLES Display_UseTitleColor(); /* use title color */ #endif + Display_Colon(); /* display: : */ + #ifdef UI_COLORED_TITLES - Display_UsePenColor(); /* use pen color */ + Display_UseOldColor(); /* use old color */ #endif @@ -1398,7 +1483,7 @@ uint8_t MenuTool(uint8_t Items, uint8_t Type, void *Menu[], unsigned char *Unit) Run = 1; /* reset loop flag (changed list) */ /* show navigation help for 2-line displays */ - if (Lines == 1) + if (Lines == 1) /* display with two lines */ { LCD_CharPos(UI.CharMax_X, UI.CharMax_Y); /* set position to bottom right */ if (Selected < Items) /* another item follows */ @@ -2497,24 +2582,45 @@ uint8_t MainMenu(void) LCD_Clear(); /* clear display */ if (Flag == 0) /* on error */ { - Display_EEString(Error_str); /* display: error! */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(1); /* center block: 1 line */ + Display_EEString_Center(Error_str); /* display: error! */ + #else + Display_EEString(Error_str); /* display: error! */ + #endif } else /* on success or exit */ { - Display_EEString(Done_str); /* display: done! */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(1); /* center block: 1 line */ + Display_EEString_Center(Done_str); /* display: done! */ + #else + Display_EEString(Done_str); /* display: done! */ + #endif } #else /* will be called again by main() until explicit exit */ if (Flag == 0) /* on error */ { LCD_Clear(); /* clear display */ - Display_EEString(Error_str); /* display: error! */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(1); /* center block: 1 line */ + Display_EEString_Center(Error_str); /* display: error! */ + #else + Display_EEString(Error_str); /* display: error! */ + #endif + WaitKey(); /* wait for any key */ } else if (Flag == KEY_EXIT) /* on exit */ { LCD_Clear(); /* clear display */ - Display_EEString(Done_str); /* display: done! */ + #ifdef UI_CENTER_ALIGN + Display_CenterLine(1); /* center block: 1 line */ + Display_EEString_Center(Done_str); /* display: done! */ + #else + Display_EEString(Done_str); /* display: done! */ + #endif } #endif diff --git a/firmware/variables.h b/firmware/variables.h index 774748e..cc84f67 100644 --- a/firmware/variables.h +++ b/firmware/variables.h @@ -154,7 +154,7 @@ /* firmware */ - const unsigned char Version_str[] MEM_TYPE = "v1.47m"; + const unsigned char Version_str[] MEM_TYPE = "v1.48m"; /* common terms and texts */ @@ -294,6 +294,14 @@ const unsigned char MAX31855_str[] MEM_TYPE = "MAX31855"; #endif + #ifdef SW_R_TRIMMER + const unsigned char R_t_str[] MEM_TYPE = "Rt"; + const unsigned char r_R1_str[] MEM_TYPE = "R1"; + #endif + + #ifdef SW_C_VLOSS + const unsigned char U_loss_str[] MEM_TYPE = "V_l"; + #endif /* component symbols */ const unsigned char Cap_str[] MEM_TYPE = {'-', LCD_CHAR_CAP, '-',0}; @@ -362,6 +370,9 @@ #ifdef HW_PROBE_ZENER const unsigned char Cmd_V_Z_str[] MEM_TYPE = "V_Z"; #endif + #ifdef SW_SCHOTTKY_BJT + const unsigned char Cmd_V_F_clamp_str[] MEM_TYPE = "V_F_clamp"; + #endif /* command reference table */ const Cmd_Type Cmd_Table[] MEM_TYPE = { @@ -414,6 +425,12 @@ #ifdef HW_PROBE_ZENER {CMD_V_Z, Cmd_V_Z_str}, #endif + #ifdef SW_C_VLOSS + {CMD_V_L, U_loss_str}, + #endif + #ifdef SW_SCHOTTKY_BJT + {CMD_V_F_CLAMP, Cmd_V_F_clamp_str}, + #endif {0, 0} }; #endif @@ -879,6 +896,15 @@ extern const unsigned char ContinuityCheck_str[]; #endif + #ifdef SW_R_TRIMMER + extern const unsigned char R_t_str[]; + extern const unsigned char r_R1_str[]; + #endif + + #ifdef SW_C_VLOSS + extern const unsigned char U_loss_str[]; + #endif + /* remote commands */ #ifdef UI_SERIAL_COMMANDS