My system: ATMega168pa, 16Mhz, TWI 400kHz, MCP23017, GLCD 128x64; WIN7 PRO 32 Bit
The fuses are set as follows: EXT 0xF9, HIGH 0xDD, LOW 0xFF, LOCK 0xFF
I use the Arduino IDE to compile and generate the *.hex file without the boot loader as I use an SPI programmer to flash the sw onto my ATMega168pa.
I use always the Arduino IDE 1.8.10 to compile my sw and I experience problems when using Nick Gammon’s “I2C_graphical_LCD_display” library.
When I compile the sw Arduino style (with “void setup()” and “void loop()”) all is ok and the 128x64 display (hooked up to MCP23017) works perfect (shows messages).
When I compile the sw AVRStudio style (with "int main()) the 128x64 display (hooked up to MCP23017) shows nothing at all and the ATMega168 seems to be frozen.
I can’t get that sw working when compiled it with the Arduino IDE using “int main()” instead of “void setup()” and “void loop()” and now I hit the middle stump.
Help/advice would be very much appreciated
I already posted that question at the “avrfreaks.net” Arduino forum "Problems with Library “I2C_graphical_LCD_display” but nobody could explain that behaviour.
Attached is the file “Klaus_01.c”
Klaus_01.c (1.83 KB)