Hello,
I've a old 3d printer I build in 2012 with a sanguinololu board (644P 16Mhz chip) and I'm trying to add an i2c display using the LMC1602 generic adapter in configuration.h of marlin 1.1.9.
I know that the 644P has very little RAM for LCD applications, indeed the LCM1602 is the only adapter that Arduino IDE manages to compile without memory errors. This is the reason why I choose an adapter with such little documentation. Of course I could have replaced the 644P with a 1284P which has more ram, or the whole board with a more powerful one, but I've already other two printers, both FDMA and Resin, so today's topic is more about a thechnical challenge.
So, I've this LCM1602 adapter, I've tested it with both 1602 and 2004 displays through a basic sketch on arduino. This is why i post this topic as a firmware issue. lcds and the adapter are perfectly working. In a first time I tought the issue may be related to pins, so I made a further test: I overwrote marlin with the same sketch I used on arduino and it worked again. But I couldn't manage to get it working on marlin. Than I thought to libraries. In order for this adapter to works, libraries to include are wire.h and LiquidCrystal_I2C.h. The latter in the version modified by Malpartida. I checked again and both were included under ultralcd_impl_HD44780.h tab. Then I thought to screen resolution. In my test sketch I used two methods: lcd.begin(16,2); and lcd.clean(), where 16 are the chars per row and 2 are the rows, while clean() cleans the screen and puts the cursor in top left position. Actually, I culd find these methods in no tab. So I tried inserting them in the setup of marlin_main.cpp, then in configuration.h, then in conditionals_lcd.h and finally in the same ultralcd_impl_HD44780.h. The Arduino IDE compiles without errors, but when i burn the firmware on sanguino nothing happens. I have the first row with 16 white squares and nothing else. Nor am I sure that these two methods are really what's missing. I've attached some pictures. Don't pay attention to unused pins of my wiring. I'm using only four GND, 5V, SDA and SCL (pins 16 and 17 on sanguino). Hope that someone have already managed this adapter and may help me to get it working. I can feel that the solution will be very silly, but in spite of all my efforts and researches I'm not yet able to find it.
[attachment 111036 LCM16021.jpg]
[attachment 111037 LCM16022.jpg]
[attachment 111038 LCM16023.jpg]
[attachment 111039 LCM16024.jpg]
I've a old 3d printer I build in 2012 with a sanguinololu board (644P 16Mhz chip) and I'm trying to add an i2c display using the LMC1602 generic adapter in configuration.h of marlin 1.1.9.
I know that the 644P has very little RAM for LCD applications, indeed the LCM1602 is the only adapter that Arduino IDE manages to compile without memory errors. This is the reason why I choose an adapter with such little documentation. Of course I could have replaced the 644P with a 1284P which has more ram, or the whole board with a more powerful one, but I've already other two printers, both FDMA and Resin, so today's topic is more about a thechnical challenge.
So, I've this LCM1602 adapter, I've tested it with both 1602 and 2004 displays through a basic sketch on arduino. This is why i post this topic as a firmware issue. lcds and the adapter are perfectly working. In a first time I tought the issue may be related to pins, so I made a further test: I overwrote marlin with the same sketch I used on arduino and it worked again. But I couldn't manage to get it working on marlin. Than I thought to libraries. In order for this adapter to works, libraries to include are wire.h and LiquidCrystal_I2C.h. The latter in the version modified by Malpartida. I checked again and both were included under ultralcd_impl_HD44780.h tab. Then I thought to screen resolution. In my test sketch I used two methods: lcd.begin(16,2); and lcd.clean(), where 16 are the chars per row and 2 are the rows, while clean() cleans the screen and puts the cursor in top left position. Actually, I culd find these methods in no tab. So I tried inserting them in the setup of marlin_main.cpp, then in configuration.h, then in conditionals_lcd.h and finally in the same ultralcd_impl_HD44780.h. The Arduino IDE compiles without errors, but when i burn the firmware on sanguino nothing happens. I have the first row with 16 white squares and nothing else. Nor am I sure that these two methods are really what's missing. I've attached some pictures. Don't pay attention to unused pins of my wiring. I'm using only four GND, 5V, SDA and SCL (pins 16 and 17 on sanguino). Hope that someone have already managed this adapter and may help me to get it working. I can feel that the solution will be very silly, but in spite of all my efforts and researches I'm not yet able to find it.
[attachment 111036 LCM16021.jpg]
[attachment 111037 LCM16022.jpg]
[attachment 111038 LCM16023.jpg]
[attachment 111039 LCM16024.jpg]