balzes
January 5, 2023, 6:10am
11
Tried to make it work on A10M so looked on Marlin code and schematics.
So my findings:
V4.1b uses display named YHCB2004
:
#define in Marlin
Arduino #
AVR port
schematics NET
H2 pins
Reality
YHCB2004_CLK
5
E3
LCM_D6
4
CS
YHCB2004_MOSI
21
D0
LCM_D5
5
CLK
YHCB2004_MISO
36
C1
LCM_D7
3
MOSI
BTN_EN1
16
H1
LCM_D4
7
BTN_EN1
BTN_EN2
17
H0
LCM_EN
8
BTN_EN2
BTN_ENC
19
D2
EC_PRESS
9
BTN_ENC
RESET
11
BEEP
12
V5
1
GND
2,6,10
Schematics:
https://www.geeetech.com/download.html?version_id=449
Using board configuration for Geetech A10 V4.1:
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
This file has been truncated. show original
with mapping from Arduino pin#(e.g. 1) to AVR port (e.g. E1):
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
This file has been truncated. show original
And according to source code it is based on AiP31068:
and uses following library to communicate:
I have all the HW and even logic analyzer connected to the pins. Trying to debug it. Maybe somebody can help me with python part. how to init it and send commands manually.
For now using this config but it sends 8-bits commands instead of required 9-bits:
[display]
lcd_type: hd44780_spi
latch_pin: PE3
spi_software_sclk_pin: PD0
spi_software_mosi_pin: PC1
spi_software_miso_pin: PH7 # any unused pin
encoder_pins: ^PH0, ^PH1
click_pin: ^!PD2