Open ejouellette opened 2 years ago
config.h contents:
/* **** *
/ source management /
/*
/* ****
/*
//#define HW_ENCODER
/*
//#define ENCODER_PULSES 4
/*
//#define ENCODER_STEPS 24
/*
//#define HW_INCDEC_KEYS
/*
/*
/*
//#define HW_DISCHARGE_RELAY
/*
/*
/*
/*
/*
//#define HW_FIXED_SIGNAL_OUTPUT
/*
//#define HW_FREQ_COUNTER_BASIC
/*
//#define HW_FREQ_COUNTER_EXT
//#define FREQ_COUNTER_PRESCALER 32 / 32:1 /
/*
//#define HW_RING_TESTER
//#define RING_TESTER_PROBES / probes /
/*
//#define HW_EVENT_COUNTER
/*
//#define EVENT_COUNTER_TRIGGER_OUT
/*
/*
/*
//#define HW_LC_METER
/*
/*
//#define LC_METER_SHOW_FREQ
/*
//#define HW_CAP_RELAY
/*
//#define HW_LOGIC_PROBE
/*
//#define HW_BUZZER
/*
//#define HW_MAX6675
/*
//#define HW_MAX31855
/* ****
/*
/*
//#define SW_PWM_PLUS
/*
/*
/*
//#define SW_OLD_ESR
/*
/*
//#define SW_ENCODER
/*
//#define SW_SQUAREWAVE
/*
//#define SW_IR_RECEIVER
/*
//#define SW_IR_DISABLE_RESISTOR
/*
/*
//#define SW_IR_TRANSMITTER
/*
//#define SW_IR_TX_ALTDELAY
/*
//#define SW_IR_TX_EXTRA
/*
/*
/*
/*
//#define SW_SERVO
/*
/*
//#define ONEWIRE_READ_ROM
/*
//#define SW_ONEWIRE_SCAN
/*
/*
/*
/*
/*
/*
/*
//#define SW_R_E24_5_T / E24 5% tolerance, text / //#define SW_R_E24_5_CC / E24 5% tolerance, color-code /
//#define SW_R_E24_1_CC / E24 1% tolerance, color-code /
//#define SW_R_E96_CC / E96 1% tolerance, color-code / //#define SW_R_E96_EIA96 / E96 1% tolerance, EIA-96 code /
/*
//#define SW_C_E6_T / E6 20% tolerance, text /
/*
//#define SW_L_E6_T / E6 20% tolerance, text /
/*
//#define SW_CONTINUITY_CHECK
/* ****
/*
//#define NO_HFE_C_RL
/* ****
/*
/* ****
/*
//#define UI_CZECH //#define UI_CZECH_2 //#define UI_DANISH //#define UI_GERMAN //#define UI_ITALIAN //#define UI_POLISH //#define UI_POLISH_2 //#define UI_ROMANIAN //#define UI_RUSSIAN //#define UI_RUSSIAN_2 //#define UI_SPANISH
/*
//#define UI_COMMA
/*
//#define UI_FAHRENHEIT
/*
/*
//#define UI_AUTOHOLD
/*
//#define UI_SHORT_CIRCUIT_MENU
/*
//#define UI_KEY_HINTS
/*
//#define UI_CHOOSE_PROFILE
/*
//#define UI_THREE_PROFILES
/*
//#define UI_SERIAL_COPY
/*
//#define UI_SERIAL_COMMANDS
/*
/*
/*
/*
/*
//#define UI_PINOUT_ALT
/*
/*
/*
//#define UI_QUARTZ_CRYSTAL
/*
//#define UI_NO_TEXTPINOUT
/*
//#define UI_NO_BODYDIODE_TEXTPINOUT
/*
//#define UI_PROBE_REVERSED //#define UI_PROBE_REVERSED_X
/*
/*
//#define UI_COLORED_TITLES
/*
//#define UI_COLORED_CURSOR
/*
//#define UI_MAINMENU_AUTOEXIT
/*
/*
/*
/*
//#define UI_ROUND_DS18B20
/*
//#define DATA_FLASH / store data in Flash /
/* ****
/*
//#define POWER_SWITCH_MANUAL
/*
//#define BAT_NONE
//#define BAT_DIVIDER
/*
//#define BAT_EXT_UNMONITORED
/*
/*
/*
/*
/*
/* ****
/*
/*
/*
/ Rl in Ohms /
/ Rh in Ohms /
/*
/*
/*
//#define R_MULTIOFFSET
/*
/*
//#define CAP_MULTIOFFSET
/*
/*
/*
/*
//#define ADC_LARGE_BUFFER_CAP
/* ****
/*
//#define LCD_READ
/*
//#define SW_DISPLAY_ID
/*
//#define SW_DISPLAY_REG
/* ****
/ MCU clock /
/*
/*
/*
/*
/* ****
/*
//#define I2C_BITBANG / bit-bang I2C / //#define I2C_HARDWARE / MCU's hardware TWI / //#define I2C_STANDARD_MODE / 100kHz bus speed / //#define I2C_FAST_MODE / 400kHz bus speed / //#define I2C_RW / enable I2C read support (untested) /
/*
//#define SPI_BITBANG / bit-bang SPI /
//#define SPI_RW / enable SPI read support /
/*
//#define SERIAL_BITBANG / bit-bang serial / //#define SERIAL_HARDWARE / hardware serial / //#define SERIAL_RW / enable serial read support /
/*
//#define ONEWIRE_IO_PIN / via dedicated I/O pin /
/* ****
/*
/ 20MHz MCU clock /
/ all other MCU clocks /
/*
/ 1MHz/250kHz /
/ 1MHz/125kHz 2MHz/250kHz /
/ 2MHz/125kHz 4MHz/250kHz /
/ 4MHz/125kHz 8MHz/250kHz /
/ 8MHz/125kHz 16MHz/250kHz /
/ 16MHz/125kHz 20MHz/156.25kHz /
/* ****
/*
/*
/*
/* ****
/*
/ memory type /
/ read functions /
/ memory type /
/ read functions /
/*
/ power switch: prefer soft-latching type /
#undef POWER_SWITCH_MANUAL
/ additional keys / / rotary encoder, increase/decrease push buttons or touch screen /
/ options which require additional keys /
/ key hints /
#undef UI_KEY_HINTS
/ PWM+ /
#undef SW_PWM_PLUS
#define SW_PWM_SIMPLE
/ squarewave generator /
#undef SW_SQUAREWAVE
/ Servo Check /
#undef SW_SERVO
/ event counter /
#undef HW_EVENT_COUNTER
/ IR Sender /
#undef SW_IR_TRANSMITTER
/ logic probe /
#undef HW_LOGIC_PROBE
/ options which require inductance measurement /
/ L monitor /
#undef SW_MONITOR_L
/ RCL Monitor /
#undef SW_MONITOR_RCL
/ RL Monitor /
#undef SW_MONITOR_RL
/ options which require ESR measurement /
/ ESR tool /
#undef SW_ESR_TOOL
/ options which require a buzzer /
/ continuity check /
#undef SW_CONTINUITY_CHECK
/ options which require a MCU clock >= 8MHz /
/ ESR measurement /
#undef SW_ESR
/ old ESR measurement /
#undef SW_OLD_ESR
/ SPI: either bit-bang or hardware /
/ SPI: common switch /
/ 9-Bit SPI requires bit-bang mode /
#error <<< 9-Bit SPI requires bit-bang mode! >>>
/ options which require SPI /
/ SPI read support /
#undef SPI_RW
/ options which require SPI read support /
/ MAX6675 /
#undef HW_MAX6675
/ MAX31855 /
#undef HW_MAX31855
/ I2C: either bit-bang or hardware /
/ I2C: common switch /
/ TTL serial: either bit-bang or hardware /
/ TTL serial: common switch /
/ VT100 display driver disables other options for serial interface /
#undef UI_SERIAL_COPY
#undef UI_SERIAL_COMMANDS
/ options which require TTL serial /
/ VT100 display /
#undef LCD_VT100
/ serial copy /
#undef UI_SERIAL_COPY
/ remote commands /
#undef UI_SERIAL_COMMANDS
/ options which require TTL serial RW /
#undef UI_SERIAL_COMMANDS
/ OneWire /
/ options which require OneWire /
/ DS18B20 /
#undef SW_DS18B20
/ OneWire scan /
#undef SW_ONEWIRE_SCAN
/ touchscreen /
/ LCD module /
/ options which require a color display /
/ color coding for probes /
#undef UI_PROBE_COLORS
/ colored titles /
#undef UI_COLORED_TITLES
/ colored cursor and key hints /
#undef UI_COLORED_CURSOR
/ options which require a color graphics display /
/ resistor color-codes /
#undef SW_R_E24_5_CC
#undef SW_R_E24_1_CC
#undef SW_R_E96_CC
/ additional font characters with reversed colors /
#define FONT_EXTRA
#define FONT_INVERSE
/ component symbols for fancy pinout /
/ fancy pinout requires graphic display and symbol set /
/ graphic display /
#undef SW_SYMBOLS
/ symbol set /
#undef SW_SYMBOLS
/ additional component symbols /
#define SYMBOLS_EXTRA
/ options which require component symbols / fancy pinout /
/ question mark symbol /
#undef UI_QUESTION_MARK
/ Zener diode symbol /
#undef UI_ZENER_DIODE
/ quartz crystal symbol /
#undef UI_QUARTZ_CRYSTAL
/ disabling text pinout /
#undef UI_NO_TEXTPINOUT
/ test-output of component symbols /
#undef SW_SYMBOL_TEST
/ frequency counter /
/ ring tester /
/ requires pulse output /
#error <<< Select pulse output for ring tester! >>>
/ prefer dedicated pin /
#undef RING_TESTER_PROBES
/ IR detector/decoder /
/ rounding for DS18B20 requires DS18B20 support /
#undef UI_ROUND_DS18B20
/ Zener check during normal probing requires "unswitched" mode /
#undef HW_PROBE_ZENER
/ read functions for display require bus with read support enabled /
#undef LCD_READ
#undef LCD_READ
/ can't check parallel busses /
/ display ID requires read functions for display /
#undef SW_DISPLAY_ID
/ output of display registers requires read functions for display and serial output /
#undef SW_DISPLAY_REG
#undef SW_DISPLAY_REG
/* ****
/ ProbePinout() /
#define FUNC_PROBE_PINOUT
#define FUNC_PROBE_PINOUT
#define FUNC_PROBE_PINOUT
#define FUNC_PROBE_PINOUT
/ E6 norm values /
/ E12 norm values /
/ E24 norm values /
/ E96 norm values /
/ Show_ENormValues(), Display_EValue() /
#define FUNC_EVALUE
#define SW_R_EXX
#define FUNC_EVALUE
/ Show_ENormCodes(), Display_ColorCode() /
#define FUNC_COLORCODE
#define SW_R_EXX
/ Show_ENormEIA96(), Display_EIA96() /
#define FUNC_EIA96
#define SW_R_EXX
/ SmoothLongKeyPress() /
#define FUNC_SMOOTHLONGKEYPRESS
/ Display_FullValue() /
#define FUNC_DISPLAY_FULLVALUE
#define FUNC_DISPLAY_FULLVALUE
#define FUNC_DISPLAY_FULLVALUE
/ Display_SignedFullValue() /
#define FUNC_DISPLAY_SIGNEDFULLVALUE
/ Display_HexByte() /
#define FUNC_DISPLAY_HEXBYTE
#define FUNC_DISPLAY_HEXBYTE
/ Display_HexValue() /
#define FUNC_DISPLAY_HEXVALUE
/ Celsius2Fahrenheit() /
#ifndef FUNC_CELSIUS2FAHRENHEIT
#define FUNC_CELSIUS2FAHRENHEIT
#endif
/ variable Start_str /
#define VAR_START_STR
#define VAR_START_STR
/* ****
config_644.h contents:
/* **** *
/ source management /
/* ****
/*
/*
/ control and data lines /
//#define LCD_DB_STD / use standard pins 0-3 for DB4-7 /
/ display settings /
/ HD44780 has an internal 5x7 font /
//#define FONT_HD44780_WIN1251 / Cyrillic font (European) /
/*
/ control and data lines /
/ display settings /
//#define LCD_BACKLIGHT_LOW / backlight is low active / / HD44780 has an internal 5x7 font /
//#define FONT_HD44780_WIN1251 / Cyrillic font (European) / / I2C bus /
/*
/ control and data lines /
/ display settings /
//#define LCD_FLIP_X / enable horizontal flip /
//#define LCD_LATE_ON / turn on LCD after clearing it / / font and symbols: horizonally aligned & flipped /
//#define FONT_10X16_HF / 10x16 font / //#define FONT_8X8_ISO8859_2_HF / 8x8 Central European font / //#define FONT_8X12T_ISO8859_2_HF / thin 8x12 Central European font / //#define FONT_8X16_ISO8859_2_HF / 8x16 Central European font / //#define FONT_10X16_ISO8859_2_HF / 10x16 Central European font / //#define FONT_8X16_WIN1251_HF / 8x16 cyrillic font / //#define FONT_8X16ALT_WIN1251_HF / 8x16 alternative cyrillic font /
//#define SYMBOLS_30X32_ALT1_HF / 30x32 alternative symbols #1 / //#define SYMBOLS_30X32_ALT2_HF / 30x32 alternative symbols #2 / //#define SYMBOLS_32X32_HF / 32x32 symbols / //#define SYMBOLS_32X32_ALT1_HF / 32x32 alternative symbols #1 / //#define SYMBOLS_32X32_ALT2_HF / 32x32 alternative symbols #2 / / SPI bus /
/*
/ control and data lines /
//#define LCD_SDO PB6 / port pin used for SDO (data output) / / display settings /
//#define LCD_FLIP_X / enable horizontal flip / //#define LCD_FLIP_Y / enable vertical flip / //#define LCD_ROTATE / switch X and Y (rotate by 90°) / //#define LCD_BGR / reverse red and blue color channels / //#define LCD_EXT_CMD_OFF / extended commands disabled / / font and symbols: horizontally aligned & flipped /
//#define FONT_16X26_ISO8859_2_HF / 16x26 Central European font / //#define FONT_16X26_WIN1251_HF / 16x26 cyrillic font / //#define SYMBOLS_32X32_HF / 32x32 symbols / //#define SYMBOLS_32X32_ALT1_HF / 32x32 alternative symbols #1 / //#define SYMBOLS_32X32_ALT2_HF / 32x32 alternative symbols #2 /
//#define SYMBOLS_24X24_ALT1_HF / test / / SPI bus /
/*
//#define LCD_ILI9481 / display controller ILI9481 /
//#define LCD_ILI9488 / display controller ILI9488 /
/ control lines /
/ data lines DB0-7 /
/ display settings /
//#define LCD_FLIP_X / enable horizontal flip / //#define LCD_FLIP_Y / enable vertical flip /
/ font and symbols: horizontally aligned & flipped /
//#define FONT_16X26_ISO8859_2_HF / 16x26 Central European font / //#define FONT_16X26_WIN1251_HF / 16x26 cyrillic font / //#define SYMBOLS_32X32_HF / 32x32 symbols / //#define SYMBOLS_32X32_ALT1_HF / 32x32 alternative symbols #1 / //#define SYMBOLS_32X32_ALT2_HF / 32x32 alternative symbols #2 /
/*
//#define LCD_ILI9481 / display controller ILI9481 / //#define LCD_ILI9486 / display controller ILI9486 /
/ control and data lines /
//#define LCD_SDO PB6 / port pin used for SDO (data output) / / display settings /
//#define LCD_FLIP_X / enable horizontal flip / //#define LCD_FLIP_Y / enable vertical flip /
//#define LCD_BGR / reverse red and blue color channels / / font and symbols: horizontally aligned & flipped /
//#define FONT_16X26_ISO8859_2_HF / 16x26 Central European font / //#define FONT_16X26_WIN1251_HF / 16x26 cyrillic font / //#define SYMBOLS_32X32_HF / 32x32 symbols / //#define SYMBOLS_32X32_ALT1_HF / 32x32 alternative symbols #1 / //#define SYMBOLS_32X32_ALT2_HF / 32x32 alternative symbols #2 /
/ SPI bus /
/*
/ control and data lines /
/ display settings /
/ font and symbols: vertically aligned & flipped /
//#define FONT_6X8_ISO8859_2_VF / 6x8 Central European font /
//#define SYMBOLS_24X24_ALT1_VFP / 24x24 alternative symbols #1 / //#define SYMBOLS_24X24_ALT2_VFP / 24x24 alternative symbols #2 / //#define LCD_ROT180 / rotate output by 180° (not supported yet) / / font and symbols: vertically aligned, bank-wise grouping, hor. flipped / //#define FONT_6X8_V_F / 6x8 font / //#define FONT_6X8_ISO8859_2_V_F / 6x8 Central European font / //#define SYMBOLS_24X24_VP_F / 24x24 symbols / //#define SYMBOLS_24X24_ALT1_VP_F / 24x24 alternative symbols #1 / //#define SYMBOLS_24X24_ALT2_VP_F / 24x24 alternative symbols #2 / / SPI bus /
/*
/ control and data lines /
/ display settings /
//#define LCD_FLIP_Y / enable vertical flip /
/ font and symbols: vertically aligned & flipped, page-wise grouping /
//#define FONT_6X8_ISO8859_2_VF / 6x8 Central European font /
//#define SYMBOLS_24X24_ALT1_VFP / 24x24 alternative symbols #1 / //#define SYMBOLS_24X24_ALT2_VFP / 24x24 alternative symbols #2 / / SPI bus /
/*
/ control and data lines /
/ display settings /
/ font and symbols: vertically aligned & flipped, bank-wise grouping / //#define FONT_6X8_VF / 6x8 font /
//#define FONT_8X16_VFP / 8x16 font / //#define FONT_6X8_ISO8859_2_VF / 6x8 Central European font / //#define FONT_8X8_ISO8859_2_VF / 8x8 Central European font / //#define FONT_8X12T_ISO8859_2_VFP / thin 8x12 Central European font / //#define FONT_8X16_ISO8859_2_VFP / 8x16 Central European font / //#define FONT_8X8_WIN1251_VF / 8x8 cyrillic font / //#define FONT_8X8ALT_WIN1251_VF / 8x8 alternative cyrillic font / //#define FONT_8X8T_WIN1251_VF / thin 8x8 cyrillic font / //#define FONT_8X12T_WIN1251_VFP / thin 8x12 cyrillic font / //#define FONT_8X16_WIN1251_VFP / 8x16 cyrillic font /
//#define SYMBOLS_24X24_ALT1_VFP / 24x24 alternative symbols #1 / //#define SYMBOLS_24X24_ALT2_VFP / 24x24 alternative symbols #2 / / SPI bus /
/*
/ control and data lines /
/ display settings /
/ font and symbols: vertically aligned & flipped, bank-wise grouping /
//#define SYMBOLS_24X24_ALT1_VFP / 24x24 alternative symbols #1 / //#define SYMBOLS_24X24_ALT2_VFP / 24x24 alternative symbols #2 / / SPI bus /
/*
/ control lines /
//#define LCD_RESET PB2 / port pin used for /RES (optional) / / display settings /
/ font and symbols: vertically aligned & flipped, bank-wise grouping /
//#define SYMBOLS_24X24_ALT1_VFP / 24x24 alternative symbols #1 / //#define SYMBOLS_24X24_ALT2_VFP / 24x24 alternative symbols #2 / / I2C bus /
/*
/ control and data lines /
/ display settings /
/ font and symbols: vertically aligned & flipped, bank-wise grouping / //#define FONT_6X8_VF / 6x8 font /
//#define FONT_8X16_VFP / 8x16 font / //#define FONT_6X8_ISO8859_2_VF / 6x8 Central European font / //#define FONT_8X8_ISO8859_2_VF / 8x8 Central European font / //#define FONT_8X12T_ISO8859_2_VFP / thin 8x12 Central European font / //#define FONT_8X16_ISO8859_2_VFP / 8x16 Central European font / //#define FONT_8X8_WIN1251_VF / 8x8 cyrillic font / //#define FONT_8X8ALT_WIN1251_VF / 8x8 alternative cyrillic font / //#define FONT_8X8T_WIN1251_VF / thin 8x8 cyrillic font / //#define FONT_8X12T_WIN1251_VFP / thin 8x12 cyrillic font / //#define FONT_8X16_WIN1251_VFP / 8x16 cyrillic font /
//#define SYMBOLS_24X24_ALT1_VFP / 24x24 alternative symbols #1 / //#define SYMBOLS_24X24_ALT2_VFP / 24x24 alternative symbols #2 / / SPI bus /
/*
/ control and data lines /
/ display settings /
/ font and symbols: vertically aligned & flipped, bank-wise grouping /
//#define SYMBOLS_24X24_ALT1_VFP / 24x24 alternative symbols #1 / //#define SYMBOLS_24X24_ALT2_VFP / 24x24 alternative symbols #2 / / SPI bus /
/*
/ control lines /
/ display settings /
/ font and symbols: vertically aligned & flipped, bank-wise grouping /
//#define SYMBOLS_24X24_ALT1_VFP / 24x24 alternative symbols #1 / //#define SYMBOLS_24X24_ALT2_VFP / 24x24 alternative symbols #2 / / I2C bus /
/*
/ control and data lines /
//#define LCD_DB_STD / use standard pins 0-3 for DB4-7 /
//#define LCD_RW ??? / port pin used for R/W (optional) / //#define LCD_RESET ??? / port pin used for XRESET (optional) / / display settings /
/ ST7036 has internal 5x8 font /
/*
/ control and data lines /
/ display settings /
/ ST7036 has internal 5x8 font /
/ SPI bus /
/*
/ control and data lines /
/ display settings /
//#define LCD_FLIP_X / enable horizontal flip /
/ font and symbols: vertically aligned & flipped, bank-wise grouping / //#define FONT_6X8_VF / 6x8 font /
//#define FONT_8X16_VFP / 8x16 font / //#define FONT_6X8_ISO8859_2_VF / 6x8 Central European font / //#define FONT_8X8_ISO8859_2_VF / 8x8 Central European font / //#define FONT_8X12T_ISO8859_2_VFP / thin 8x12 Central European font / //#define FONT_8X16_ISO8859_2_VFP / 8x16 Central European font / //#define FONT_8X8_WIN1251_VF / 8x8 cyrillic font / //#define FONT_8X8ALT_WIN1251_VF / 8x8 alternative cyrillic font / //#define FONT_8X8T_WIN1251_VF / thin 8x8 cyrillic font / //#define FONT_8X12T_WIN1251_VFP / thin 9x12 cyrillic font / //#define FONT_8X16_WIN1251_VFP / 8x16 cyrillic font /
//#define SYMBOLS_24X24_ALT1_VFP / 24x24 alternative symbols #1 / //#define SYMBOLS_24X24_ALT2_VFP / 24x24 alternative symbols #2 / / SPI bus /
/*
//#if 0
/ control and data lines /
//#define LCD_CS PB / port pin used for /CSX (optional) /
/ display settings /
//#define LCD_OFFSET_X 4 / enable x offset of 2 or 4 dots / //#define LCD_OFFSET_Y 2 / enable y offset of 1 or 2 dots /
//#define LCD_FLIP_Y / enable vertical flip /
//#define LCD_BGR / reverse red and blue color channels /
/ font and symbols: horizontally aligned & flipped / //#define FONT_10X16_HF / 10x16 font / //#define FONT_6X8_ISO8859_2_HF / 6x8 Central European font / //#define FONT_8X8_ISO8859_2_HF / 8x8 Central European font / //#define FONT_8X12T_ISO8859_2_HF / thin 8x12 Central European font /
//#define FONT_10X16_ISO8859_2_HF / 10x16 Central European font / //#define FONT_8X16_WIN1251_HF / 8x16 cyrillic font / //#define FONT_8X16ALT_WIN1251_HF / 8x16 alternative cyrillic font /
//#define SYMBOLS_30X32_ALT1_HF / 30x32 alternative symbols #1 / //#define SYMBOLS_30X32_ALT2_HF / 30x32 alternative symbols #2 / //#define SYMBOLS_32X32_HF / 32x32 symbols / //#define SYMBOLS_32X32_ALT1_HF / 32x32 alternative symbols #1 / //#define SYMBOLS_32X32_ALT2_HF / 32x32 alternative symbols #2 / / SPI bus /
//#endif
/*
/ control and data lines /
/ display settings /
/ font and symbols: horizonally aligned /
//#define FONT_8X8_ISO8859_2_H / 8x8 Central European font /
//#define SYMBOLS_24X24_ALT1_H / alternative 24x24 symbols #1 / //#define SYMBOLS_24X24_ALT2_H / alternative 24x24 symbols #2 / //#define LCD_ROT180 / rotate output by 180° / / font and symbols: horizonally aligned & flipped / //#define FONT_8X8_HF / 8x8 font / //#define FONT_8X8_ISO8859_2_HF / 8x8 Central European font / //#define SYMBOLS_24X24_HF / 24x24 symbols / //#define SYMBOLS_24X24_ALT1_HF / alternative 24x24 symbols #1 / //#define SYMBOLS_24X24_ALT2_HF / alternative 24x24 symbols #2 / / SPI bus /
/*
/ control and data lines /
//#define LCD_DB_STD / use standard pins 0-3 for DB4-7 /
//#define LCD_RW PB? / port pin used for RW (optional) / //#define LCD_RESET PB? / port pin used for /RESET (optional) / / display settings /
/ font and symbols: horizonally aligned /
//#define SYMBOLS_24X24_ALT1_H / alternative 24x24 symbols #1 / //#define SYMBOLS_24X24_ALT2_H / alternative 24x24 symbols #2 / //#define LCD_ROT180 / rotate output by 180° / / font and symbols: horizonally aligned & flipped / //#define FONT_8X8_HF / 8x8 font / //#define SYMBOLS_24X24_HF / 24x24 symbols / //#define SYMBOLS_24X24_ALT1_HF / alternative 24x24 symbols #1 / //#define SYMBOLS_24X24_ALT2_HF / alternative 24x24 symbols #2 /
/*
/ control and data lines /
/ display settings /
/ font and symbols: vertically aligned & flipped /
//#define FONT_6X8_ISO8859_2_VF / 6x8 Central European font /
//#define SYMBOLS_24X24_ALT1_VFP / 24x24 alternative symbols #1 / //#define SYMBOLS_24X24_ALT2_VFP / 24x24 alternative symbols #2 / / SPI bus /
/*
//#define SERIAL_BITBANG / bit-bang serial /
/*
/* ****
/*
/*
//#define TOUCH_FLIP_X / enable horizontal flip / //#define TOUCH_FLIP_Y / enable vertical flip / //#define TOUCH_ROTATE / switch X and Y (rotate by 90°) /
/* ****
/*
/*
/*
/*
/*
/*
/*
/*
/ counter input /
/ control of extended frequency counter /
/*
/*
/*
/*
/ for bit-bang and hardware SPI /
/*
/ for bit-bang I2C /
/*
/ for hardware TTL serial /
/ for bit-bang TTL serial /
/*
/*
/*
/*
/*
/*
/* ****
/ ADC reference selection: AVcc /
/ ADC reference selection: internal 1.1V bandgap /
/ ADC reference selection: internal 2.56V (bandgap 2.328) */
/ ADC reference selection: filter mask for register bits /
/ ADC MUX channel: internal 1.1V bandgap reference /
/ ADC MUX channel: filter mask for register bits /
/* ****
/*
/ estimated internal resistance of port to GND (in 0.1 Ohms) /
/ estimated internal resistance of port to VCC (in 0.1 Ohms) /
/ voltage offset of MCU's analog comparator (in mV): -50 up to 50 /
/ this MCU has 32kB Flash, 1kB EEPROM and 2kB RAM (enable extra features) /
/*
/ estimated internal resistance of port to GND (in 0.1 Ohms) /
/ estimated internal resistance of port to VCC (in 0.1 Ohms) /
/ voltage offset of MCU's analog comparator (in mV): -50 up to 50 /
/ this MCU has 64kB Flash, 2kB EEPROM and 4kB RAM (enable extra features) /
/*
/ estimated internal resistance of port to GND (in 0.1 Ohms) /
/ estimated internal resistance of port to VCC (in 0.1 Ohms) /
/ voltage offset of MCU's analog comparator (in mV): -50 up to 50 /
/ this MCU has 128kB Flash, 4kB EEPROM and 16kB RAM (enable extra features) /
/*
/* ****
Makefile contents:
#
#
#
PROJECT = ComponentTester
#
#
MCU = atmega324p
FREQ = 16
OSCILLATOR = Crystal
ifeq (${OSCILLATOR},RC) OSC_STARTUP = 6 endif ifeq (${OSCILLATOR},Crystal) OSC_STARTUP = 16384 endif ifeq (${OSCILLATOR},LowPower) OSC_STARTUP = 16384 endif
#
#
PARTNO = m324pa
PROGRAMMER = usbasp PORT = usb OPTIONS = -B 20
#
#
NAME = ComponentTester
DIST = $(notdir ${CURDIR})
CC = avr-gcc CPP = avr-g++ CFLAGS = -mmcu=${MCU} -Wall -I. -Ibitmaps CFLAGS += -DF_CPU=${FREQ}000000UL CFLAGS += -DOSC_STARTUP=${OSC_STARTUP} CFLAGS += -gdwarf-2 -std=gnu99 -Os -mcall-prologues CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d
LDFLAGS = -mmcu=${MCU} -Wl,-Map=${NAME}.map
HEX_FLASH_FLAGS = -R .eeprom -R .fuse -R .lock -R .signature HEX_EEPROM_FLAGS = -j .eeprom HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings
HEADERS = config.h config_328.h config_644.h config1280.h HEADERS += colors.h common.h functions.h variables.h $(wildcard var*.h) HEADERS += OneWire.h ADS7843.h HEADERS += HD44780.h ILI9163.h ILI9341.h ILI9481.h ILI9486.h ILI9488.h HEADERS += PCD8544.h PCF8814.h SH1106.h SSD1306.h HEADERS += ST7036.h ST7565R.h ST7735.h ST7920.h STE2007.h
OBJECTS_C = main.o user.o pause.o adjust.o ADC.o probes.o display.o OBJECTS_C += resistor.o cap.o semi.o inductor.o OBJECTS_C += tools_misc.o tools_signal.o tools_LC_Meter.o OBJECTS_C += SPI.o I2C.o serial.o commands.o OneWire.o OBJECTS_C += IR_RX.o IR_TX.o DHTxx.o ADS7843.o MAX6675.o MAX31855.o OBJECTS_C += HD44780.o ILI9163.o ILI9341.o ILI9481.o ILI9486.o ILI9488.o OBJECTS_C += PCD8544.o PCF8814.o SH1106.o SSD1306.o OBJECTS_C += ST7036.o ST7565R.o ST7735.o Semi_ST7735.o ST7920.o OBJECTS_C += STE2007.o VT100.o RD_Display.o OBJECTS_S = wait.o OBJECTS = ${OBJECTS_C} ${OBJECTS_S}
#
#
.PHONY: all size all: ${NAME} ${NAME}.hex ${NAME}.eep ${NAME}.lss size
#
#
$(NAME): ${OBJECTS} ${CC} ${LDFLAGS} ${OBJECTS} ${LIBDIRS} ${LIBS} -o ${NAME}
%.hex: ${NAME} avr-objcopy -O ihex ${HEX_FLASH_FLAGS} $< $@
%.eep: ${NAME} -avr-objcopy ${HEX_EEPROM_FLAGS} -O ihex $< $@ || exit 0
%.lss: ${NAME} avr-objdump -h -S $< > $@
size: ${NAME} @echo @avr-size -C --mcu=${MCU} $<
#
#
${OBJECTS_C}: %.o: %.c ${HEADERS} ${MAKEFILE_LIST} ${CC} ${CFLAGS} -c ${@:.o=.c}
${OBJECTS_S}: %.o: %.S ${HEADERS} ${MAKEFILE_LIST} ${CC} ${CFLAGS} -c ${@:.o=.S}
-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*)
#
#
.PHONY: upload upload: ${NAME} ${NAME}.hex ${NAME}.eep ${NAME}.lss size avrdude -c ${PROGRAMMER} -P ${PORT} -p ${PARTNO} ${OPTIONS} \ -U flash:w:./${NAME}.hex:a -U eeprom:w:./${NAME}.eep:a
.PHONY: prog_fw prog_fw: ${NAME} ${NAME}.hex ${NAME}.lss size avrdude -c ${PROGRAMMER} -P ${PORT} -p ${PARTNO} ${OPTIONS} \ -U flash:w:./${NAME}.hex:a
.PHONY: prog_ee prog_ee: ${NAME} ${NAME}.eep ${NAME}.lss size avrdude -c ${PROGRAMMER} -P ${PORT} -p ${PARTNO} ${OPTIONS} \ -U eeprom:w:./${NAME}.eep:a
#
#
.PHONY: dist clean dist: clean cd ..; tar -czf ${DIST}/${DIST}.tgz \ ${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
clean: -rm -rf ${OBJECTS} ${NAME} dep/ .tgz -rm -rf ${NAME}.hex ${NAME}.eep ${NAME}.lss ${NAME}.map
#
#
ifeq (${MCU},atmega328) FAMILY = atmega328_324_640 endif
ifeq (${MCU},atmega328pb) FAMILY = atmega328pb endif
ifeq (${MCU},atmega324p) FAMILY = atmega328_324_640 endif
ifeq (${MCU},atmega640) FAMILY = atmega328_324_640 endif
ifeq (${MCU},atmega644) FAMILY = atmega328_324_640 endif
ifeq (${MCU},atmega1280) FAMILY = atmega328_324_640 endif
ifeq (${MCU},atmega1284) FAMILY = atmega328_324_640 endif
ifeq (${MCU},atmega2560) FAMILY = atmega328_324_640 endif
ifeq (${FAMILY},atmega328_324_640)
HFUSE = -U hfuse:w:0xd9:m
EFUSE = -U efuse:w:0xfc:m
ifeq (${FREQ},1)
LFUSE_RC = -U lfuse:w:0x62:m
# external 8MHz full swing crystal and /8 clock divider
LFUSE_CRYSTAL = -U lfuse:w:0x77:m
# external 8MHz low power crystal and /8 clock divider
LFUSE_LOWPOWER = -U lfuse:w:0x7f:m
endif ifeq (${FREQ},8)
LFUSE_RC = -U lfuse:w:0xe2:m
# external 8MHz full swing crystal and /1 clock divider
LFUSE_CRYSTAL = -U lfuse:w:0xf7:m
# external 8MHz low power crystal and /1 clock divider
LFUSE_LOWPOWER = -U lfuse:w:0xff:m
endif ifeq (${FREQ},16)
LFUSE_RC =
# external 16MHz full swing crystal and /1 clock divider
LFUSE_CRYSTAL = -U lfuse:w:0xf7:m
# external 16MHz low power crystal and /1 clock divider
LFUSE_LOWPOWER = -U lfuse:w:0xff:m
endif ifeq (${FREQ},20)
LFUSE_RC =
# external 20MHz full swing crystal and /1 clock divider
LFUSE_CRYSTAL = -U lfuse:w:0xf7:m
# external 20MHz low power crystal and /1 clock divider
LFUSE_LOWPOWER = -U lfuse:w:0xff:m
endif endif
ifeq (${FAMILY},atmega328pb)
HFUSE = -U hfuse:w:0xd9:m
EFUSE = -U efuse:w:0xf4:m
ifeq (${FREQ},8)
LFUSE_RC = -U lfuse:w:0xe2:m
# full swing crystal not supported, use low power crystal
LFUSE_CRYSTAL = -U lfuse:w:0xff:m
# external 8MHz low power crystal and /1 clock divider
LFUSE_LOWPOWER = -U lfuse:w:0xff:m
endif ifeq (${FREQ},16)
LFUSE_RC =
# full swing crystal not supported, use low power crystal
LFUSE_CRYSTAL = -U lfuse:w:0xff:m
# external 16MHz low power crystal and /1 clock divider
LFUSE_LOWPOWER = -U lfuse:w:0xff:m
endif endif
ifeq (${OSCILLATOR},RC) LFUSE = ${LFUSE_RC} endif ifeq (${OSCILLATOR},Crystal) LFUSE = ${LFUSE_CRYSTAL} endif ifeq (${OSCILLATOR},LowPower) LFUSE = ${LFUSE_LOWPOWER} endif
FUSES = ifneq ($(strip ${LFUSE}),) ifneq ($(strip ${HFUSE}),) FUSES = ${LFUSE} ${HFUSE} ${EFUSE} endif endif
.PHONY: fuses fuses: ifeq ($(strip ${FUSES}),) @echo Invalid fuse settings! else avrdude -c ${PROGRAMMER} -P ${PORT} -p ${PARTNO} ${OPTIONS} ${FUSES} endif
The LCR TC-2 clone actually requires SPI_BITBANG interface instead of SPI_HARDWARE. Once I selected that mode, the code compiled fine. So, I no longer need this issue with SPI_HARDWARE interface fixed, though still it would be nice if it were resolved for other devices which need it. Thanks!
Hi, When running make, multiple .c files compile fine, then compiling stops with several errors in SPI.c :
C:\Temp\ComponentTester-1.47m>make avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT main.o -MF dep/main.o.d -c main.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT user.o -MF dep/user.o.d -c user.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT pause.o -MF dep/pause.o.d -c pause.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT adjust.o -MF dep/adjust.o.d -c adjust.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT ADC.o -MF dep/ADC.o.d -c ADC.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT probes.o -MF dep/probes.o.d -c probes.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT display.o -MF dep/display.o.d -c display.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT resistor.o -MF dep/resistor.o.d -c resistor.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT cap.o -MF dep/cap.o.d -c cap.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT semi.o -MF dep/semi.o.d -c semi.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT inductor.o -MF dep/inductor.o.d -c inductor.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT tools_misc.o -MF dep/tools_misc.o.d -c tools_misc.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT tools_signal.o -MF dep/tools_signal.o.d -c tools_signal.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT tools_LC_Meter.o -MF dep/tools_LC_Meter.o.d -c tools_LC_Meter.c avr-gcc -mmcu=atmega324p -Wall -I. -Ibitmaps -DF_CPU=16000000UL -DOSC_STARTUP=16384 -gdwarf-2 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT SPI.o -MF dep/SPI.o.d -c SPI.c SPI.c: In function 'SPI_Clock': SPI.c:363:10: error: 'SPCR' undeclared (first use in this function); did you mean 'SPCR0'? Bits = SPCR; / get control register / ^~~~ SPCR0 SPI.c:363:10: note: each undeclared identifier is reported only once for each function it appears in SPI.c:364:19: error: 'SPR1' undeclared (first use in this function); did you mean 'SPR10'? Bits &= ~((1 << SPR1) | (1 << SPR0)); / clear clock rate bits / ^~~~ SPR10 SPI.c:364:33: error: 'SPR0' undeclared (first use in this function); did you mean 'SPR1'? Bits &= ~((1 << SPR1) | (1 << SPR0)); / clear clock rate bits / ^~~~ SPR1 SPI.c:381:18: error: 'SPI2X' undeclared (first use in this function); did you mean 'SPI2X0'? Bits = (1 << SPI2X); / set bit to double SPI speed / ^~~~~ SPI2X0 SPI.c:384:3: error: 'SPSR' undeclared (first use in this function); did you mean 'SPCR'? SPSR = Bits; / update register / ^~~~ SPCR SPI.c: In function 'SPI_Setup': SPI.c:419:3: error: 'SPCR' undeclared (first use in this function); did you mean 'SPCR0'? SPCR = (1 << SPE) | (1 << MSTR); ^~~~ SPCR0 SPI.c:419:16: error: 'SPE' undeclared (first use in this function); did you mean 'SPI'? SPCR = (1 << SPE) | (1 << MSTR); ^~~ SPI SPI.c:419:29: error: 'MSTR' undeclared (first use in this function); did you mean 'MSTR0'? SPCR = (1 << SPE) | (1 << MSTR); ^~~~ MSTR0 SPI.c:425:10: error: 'SPSR' undeclared (first use in this function); did you mean 'SPCR'? Bits = SPSR; / read flag / ^~~~ SPCR SPI.c:426:10: error: 'SPDR' undeclared (first use in this function); did you mean 'SPSR'? Bits = SPDR; / clear flag by reading data / ^~~~ SPSR SPI.c: In function 'SPI_Write_Byte': SPI.c:444:3: error: 'SPDR' undeclared (first use in this function); did you mean 'SPDR0'? SPDR = Byte; / start transmission / ^~~~ SPDR0 SPI.c:445:12: error: 'SPSR' undeclared (first use in this function); did you mean 'SPDR'? while (!(SPSR & (1 << SPIF))); / wait for flag / ^~~~ SPDR SPI.c:445:25: error: 'SPIF' undeclared (first use in this function); did you mean 'SPI'? while (!(SPSR & (1 << SPIF))); / wait for flag / ^~~~ SPI SPI.c: In function 'SPI_WriteRead_Byte': SPI.c:468:3: error: 'SPDR' undeclared (first use in this function); did you mean 'SPDR0'? SPDR = Byte; / start transmission / ^~~~ SPDR0 SPI.c:469:12: error: 'SPSR' undeclared (first use in this function); did you mean 'SPDR'? while (!(SPSR & (1 << SPIF))); / wait for flag / ^~~~ SPDR SPI.c:469:25: error: 'SPIF' undeclared (first use in this function); did you mean 'SPI'? while (!(SPSR & (1 << SPIF))); / wait for flag / ^~~~ SPI make: *** [SPI.o] Error 1
C:\Temp\ComponentTester-1.47m>avr-gcc --version avr-gcc (AVR_8_bit_GNU_Toolchain_3.7.0_1796) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Note: I have SPI_HARDWARE defined in config.h Please also see attached config.h, config_644.h, and Makefile which have been modified for the LCR TC-2 clone. Would you please help me resolve the compile errors?
Thanks!