Welcome! Log In Create A New Profile

Advanced

Trigorilla 14 Board with Zonestar (LCD2004) Display

Posted by Hoast 
Trigorilla 14 Board with Zonestar (LCD2004) Display
November 29, 2019 05:40PM
Hi everybody,

I am owning a CTC Prusa i3 diy printer for about 5 months now and its my first printer. I think it was the best decision to learn as much as possible about 3D printers. And I am modifying it heavily. I recently bought a new mainboard, the Trigorilla 14 Board, because I want to use the TMC2204 stepper drivers. The stock Anet A8 mainboard clone has fixed stepper Drivers, so I had to buy a new board to change the stepper drivers.

When I decided to buy the Trigorilla board (it's the same board, the Anycubic I3 Mega is using afaik), I made sure it is supporting my old Zonestar (LCD2004) display, which the printer is originally using. When I started to edit the firmware of the Trigorilla board, so that it mostly fits to my printer, i came along a problem. And because I am still quite new in terms of the firmware, I was not able to solve that problem on my own so far.

The description in "Configuration.h" tells me:
#define ZONESTAR_LCD            // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
                                  // This LCD is known to be susceptible to electrical interference
                                  // which scrambles the display.  Pressing any button clears it up.
                                  // This is a LCD2004 display with 5 analog buttons.
And when I try to compile that sketch, an error about that "ADC_KEYPAD_PIN" occurs:
Arduino: 1.8.9 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from sketch\MarlinConfig.h:39:0,

                 from sketch\Marlin.h:35,

                 from sketch\temperature.cpp:27:

sketch\temperature.cpp: In static member function 'static void Temperature::isr()':

temperature.cpp:2252:23: error: 'ADC_KEYPAD_PIN' was not declared in this scope

         HAL_START_ADC(ADC_KEYPAD_PIN);

                       ^

sketch\HAL.h:323:34: note: in definition of macro 'HAL_START_ADC'

   #define HAL_START_ADC(pin) if (pin > 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(pin)

                                  ^

temperature.cpp:2252:23: error: 'ADC_KEYPAD_PIN' was not declared in this scope

         HAL_START_ADC(ADC_KEYPAD_PIN);

                       ^

sketch\HAL.h:321:53: note: in definition of macro 'SET_ADMUX_ADCSRA'

 #define SET_ADMUX_ADCSRA(pin) ADMUX = _BV(REFS0) | (pin & 0x07); SBI(ADCSRA, ADSC)

                                                     ^

sketch\temperature.cpp:2252:9: note: in expansion of macro 'HAL_START_ADC'

         HAL_START_ADC(ADC_KEYPAD_PIN);

         ^

exit status 1
'ADC_KEYPAD_PIN' was not declared in this scope

Dieser Bericht wäre detaillierter, wenn die Option
"Ausführliche Ausgabe während der Kompilierung"
in Datei -> Voreinstellungen aktiviert wäre.
OK, the Keypad pin has to be assigned to an analog pin. But I don't know, what the adc keypad pin itself is and I also don't know, what pins on my board are analog. And even if I knew it, I am not sure, how to saflefy change the pin assignment in pins_trigorilla_14.h, so that nothing is broken afterwards. And furthermore the ADC_KEYPAD_PIN doesn't even appear in the pins_trigorilla_14.h file.

The pins of the Trigorilla board can be seen in the following link:
Trigorilla 14 Pins

I would be very glad, if somebody could help me solving this problem. If any further information are needed, please ask and I do my best to provide it.
And I am sorry for my bad english.

Best regards
Hoast
Attachments:
open | download - Configuration.h (73.2 KB)
open | download - pins.h (28.9 KB)
open | download - pins_TRIGORILLA_14.h (5.6 KB)
Re: Trigorilla 14 Board with Zonestar (LCD2004) Display
November 29, 2019 08:01PM
"And furthermore the ADC_KEYPAD_PIN doesn't even appear in the pins_trigorilla_14.h file."

This is your problem...

The exp1 connector the ADC pin from the lcd goes to D37 this is also know A8

You need to add a "#define ADC_KEYPAD_PIN 8" to your pins_TRIGORILLA_14.h
Re: Trigorilla 14 Board with Zonestar (LCD2004) Display
November 29, 2019 08:15PM
Wow, that is really working so far, the sketch can be compiled that way! smiling smiley

But one more question then, regarding the linked picture in my first post, the exp1 connector is supposed to be for the 12864 LCD display and exp2 is supposed to be for the LCD2004 (which is my display).
So do I really have to assign the ADC_KEYPAD_PIN to D37 respectivley to 8?

But I am already really thankful, that you could help me so fast! Thank you very much! smiling smiley
Re: Trigorilla 14 Board with Zonestar (LCD2004) Display
November 29, 2019 08:52PM
LCD2004 is not the same as a Zonestar LCD2004 Display. Even though the both do have 20x4 character displays.
A real LCD2004 has two cables and uses both EXP1 and EXP2

The Zonestar needs power. Only exp1 has a 5v power pin.

The display needs


You need the following in your pin file for this LCD

#define ADC_KEYPAD_PIN 8
#define LCD_PINS_ENABLE 17
#define LCD_PINS_RS 23
#define LCD_PINS_D4 29
#define LCD_PINS_D5 25
#define LCD_PINS_D6 16
#define LCD_PINS_D7 35

Edited 1 time(s). Last edit at 11/29/2019 08:53PM by Dust.
Re: Trigorilla 14 Board with Zonestar (LCD2004) Display
November 29, 2019 09:49PM
Oh, okay. I didn't know, that the Zonestar is a different one.

I changed/added the mentioned Lines in the pins_trigorilla_14.h and compiled it successfully, although I get some Warnings like:

sketch\pins_TRIGORILLA_14.h:233:0: warning: "LCD_PINS_D7" redefined

     #define LCD_PINS_D7 35

 ^

sketch\pins_TRIGORILLA_14.h:135:0: note: this is the location of the previous definition

   #define LCD_PINS_D7 29


The warning refers to a Line which is part of an if-loop of an ULTRA_LCD which I am not using. So I guess, thats okay, as far as it is working, right?

I am going to try to actually flash the board tomorrow and will report if it is working.
Dust, thank you very much so far!
Re: Trigorilla 14 Board with Zonestar (LCD2004) Display
December 04, 2019 02:43PM
Hallo bin absolut neu im 3 D drucken

Meine Frage kann mir bitte einer helfen ich benötige für einen Anycubic i3 Clone die richtige Firmware trigorilla Board. Dual Extruder 210*210 ich bekomme leider vom Verkäufer keine Hilfe
Sorry, only registered users may post in this forum.

Click here to login