![]() ![]() #define WITH_AUTO_REF // REF_C_KORR corrects the reference Voltage for capacity measurement (5.3V). #define FREQUENCY_50HZ // The WITH_AUTO_REF option enables reading of internal REF-voltage to get factors for the Capacity measuring. #define AUTO_CAL // FREQUENCY_50HZ enables a 50 Hz frequency generator for up to one minute at the end of selftests. The AUTO_CAL option is only selectable for mega168 and mega328. With a external capacitor a additionally correction of reference voltage is figured out for // low capacity measurement and also for the AUTOSCALE_ADC measurement. #define WITH_SELFTEST // AUTO_CAL will enable the autocalibration of zero offset of capacity measurement and // also the port output resistance values will be find out in SELFTEST section. ![]() #define STRIP_GRID_BOARD // The WITH_SELFTEST option enables selftest function (only for mega168 or mega328). #define LCD_DOGM // Option STRIP_GRID_BOARD selects different board-layout, do not set for standard board! // The connection of LCD is totally different for both versions. For this LCD type the contrast must be set with software command. Russian language requires a LCD controller with russian characterset and option LCD_CYRILLIC! #define LCD_CYRILLIC // The LCD_DOGM option must be set for support of the DOG-M type of LCD modules with ST7036 controller. This lcd-display don't have a character for Ohm and for u (micro). #define MCU atmega328p #define F_CPU 16000000UL // Select your language: // Available languages are: LANG_ENGLISH, LANG_GERMAN, LANG_POLISH, LANG_CZECH, LANG_SLOVAK, LANG_SLOVENE, // LANG_DUTCH, LANG_BRASIL, LANG_RUSSIAN, LANG_UKRAINIAN #define LANG_ENGLISH // The LCD_CYRILLIC option is necessary, if you have a display with cyrillic characterset. * \\\|/// \\ - // ( ) /-oOOo-(_)-oOOo-\ | | | | | Transistor Tester for Arduino (version 1.08a) | | | | based on code: Karl-Heinz Kubbeler (version 1.08k) | | | | | | Oooo | \-oooO-( )-/ ( ) ) / \ ( (_/ \_) */ #include #include #include #include #include #include #include #include #include #include #include #include //#define LCD1602 //#define LCD_I2C //#define NOK5110 //#define OLED096 #define OLED_I2C #ifdef LCD_I2C #ifndef LCD1602 #define LCD1602 #endif #endif #ifdef OLED_I2C #ifndef OLED096 #define OLED096 #endif #endif #ifdef LCD1602 #ifdef LCD_I2C #include #include #else #include #endif #endif #ifdef NOK5110 #include #include #include #endif #ifdef OLED096 #include #include #include #include #define TOP_ROW 4 #endif // ******** config options for your Semiconductor tester // Every changing of this Makefile will result in new compiling the whole // programs, if you call make or make upload. Test with program in #include #include #include #include #include "stdint.h" //JLG #include #include #include #include #include #define MAIN_C #include "Makefile.h" //JLG #include "Transistortester.h" #include "config.h" #include "part_defs.h" #include "lcd_routines.h" #include "lcd_defines.h" #include "wait1000ms.h" #include "autoconf.h" #include "tt_function.h" #include "tt_resistor.h" #include "bitmaps.h" #include "font.h" #include "24x32update_bitmaps.h" /* defines global variables in RAM and EEprom from file tt_globals.h */ /* removed ifdef MAIN_C because always defined */ #define COMMON #ifdef AUTO_CAL const int8_t RefDiff EEMEM = REF_R_KORR // correction of internal Reference Voltage // const uint16_t cap_null EEMEM = C_NULL // Zero offset of capacity measurement const int16_t ref_offset EEMEM = REF_C_KORR // default correction of internal reference voltage for capacity measurement // the zero offset for capacity measurement for all pin combinations // LoPin:HiPin 2:1 3:1 1:2 marker 3:2 1:3 2:3 const uint8_t c_zero_tab EEMEM = #endif // WITH_HARDWARE_SERIAL #if POWER_OFF+0 > 1 empty_count = 0 mess_count = 0 #endif ADCconfig. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |