mirror of
				https://github.com/Klipper3d/klipper.git
				synced 2025-10-31 18:36:09 +01:00 
			
		
		
		
	config: Update several config files to use board aliases for lcd
Add a sample-lcd.cfg with the defintions for several common "reprap" style LCD displays that use the EXP1/EXP2 plugs. Update several config files to add EXP1/EXP2 board aliases. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
		
				
					committed by
					
						 KevinOConnor
						KevinOConnor
					
				
			
			
				
	
			
			
			
						parent
						
							bfbcb90751
						
					
				
				
					commit
					e817b85b78
				
			| @@ -134,9 +134,9 @@ max_z_accel: 100 | |||||||
|  |  | ||||||
| #[tmc2130 stepper_x] | #[tmc2130 stepper_x] | ||||||
| #cs_pin: P1.17 | #cs_pin: P1.17 | ||||||
| #spi_software_sclk_pin: P0.4 |  | ||||||
| #spi_software_mosi_pin: P4.28 |  | ||||||
| #spi_software_miso_pin: P0.5 | #spi_software_miso_pin: P0.5 | ||||||
|  | #spi_software_mosi_pin: P4.28 | ||||||
|  | #spi_software_sclk_pin: P0.4 | ||||||
| ##diag1_pin: P1.29 | ##diag1_pin: P1.29 | ||||||
| #microsteps: 16 | #microsteps: 16 | ||||||
| #run_current: 0.800 | #run_current: 0.800 | ||||||
| @@ -145,9 +145,9 @@ max_z_accel: 100 | |||||||
|  |  | ||||||
| #[tmc2130 stepper_y] | #[tmc2130 stepper_y] | ||||||
| #cs_pin: P1.15 | #cs_pin: P1.15 | ||||||
| #spi_software_sclk_pin: P0.4 |  | ||||||
| #spi_software_mosi_pin: P4.28 |  | ||||||
| #spi_software_miso_pin: P0.5 | #spi_software_miso_pin: P0.5 | ||||||
|  | #spi_software_mosi_pin: P4.28 | ||||||
|  | #spi_software_sclk_pin: P0.4 | ||||||
| ##diag1_pin: P1.27 | ##diag1_pin: P1.27 | ||||||
| #microsteps: 16 | #microsteps: 16 | ||||||
| #run_current: 0.800 | #run_current: 0.800 | ||||||
| @@ -156,9 +156,9 @@ max_z_accel: 100 | |||||||
|  |  | ||||||
| #[tmc2130 stepper_z] | #[tmc2130 stepper_z] | ||||||
| #cs_pin: P1.10 | #cs_pin: P1.10 | ||||||
| #spi_software_sclk_pin: P0.4 |  | ||||||
| #spi_software_mosi_pin: P4.28 |  | ||||||
| #spi_software_miso_pin: P0.5 | #spi_software_miso_pin: P0.5 | ||||||
|  | #spi_software_mosi_pin: P4.28 | ||||||
|  | #spi_software_sclk_pin: P0.4 | ||||||
| ##diag1_pin: P1.25 | ##diag1_pin: P1.25 | ||||||
| #microsteps: 16 | #microsteps: 16 | ||||||
| #run_current: 0.650 | #run_current: 0.650 | ||||||
| @@ -167,9 +167,9 @@ max_z_accel: 100 | |||||||
|  |  | ||||||
| #[tmc2130 extruder] | #[tmc2130 extruder] | ||||||
| #cs_pin: P1.8 | #cs_pin: P1.8 | ||||||
| #spi_software_sclk_pin: P0.4 |  | ||||||
| #spi_software_mosi_pin: P4.28 |  | ||||||
| #spi_software_miso_pin: P0.5 | #spi_software_miso_pin: P0.5 | ||||||
|  | #spi_software_mosi_pin: P4.28 | ||||||
|  | #spi_software_sclk_pin: P0.4 | ||||||
| ##diag1_pin: P1.28 | ##diag1_pin: P1.28 | ||||||
| #microsteps: 16 | #microsteps: 16 | ||||||
| #run_current: 0.800 | #run_current: 0.800 | ||||||
| @@ -178,9 +178,9 @@ max_z_accel: 100 | |||||||
|  |  | ||||||
| #[tmc2130 extruder1] | #[tmc2130 extruder1] | ||||||
| #cs_pin: P1.1 | #cs_pin: P1.1 | ||||||
| #spi_software_sclk_pin: P0.4 |  | ||||||
| #spi_software_mosi_pin: P4.28 |  | ||||||
| #spi_software_miso_pin: P0.5 | #spi_software_miso_pin: P0.5 | ||||||
|  | #spi_software_mosi_pin: P4.28 | ||||||
|  | #spi_software_sclk_pin: P0.4 | ||||||
| ##diag1_pin: P1.26 | ##diag1_pin: P1.26 | ||||||
| #microsteps: 16 | #microsteps: 16 | ||||||
| #run_current: 0.800 | #run_current: 0.800 | ||||||
| @@ -189,63 +189,17 @@ max_z_accel: 100 | |||||||
|  |  | ||||||
|  |  | ||||||
| ######################################## | ######################################## | ||||||
| # Optional LCD configuration | # EXP1 / EXP2 (display) pins | ||||||
| ######################################## | ######################################## | ||||||
|  |  | ||||||
| # "RepRapDiscount 128x64 Full Graphic Smart Controller" type displays | [board_pins] | ||||||
| #[display] | aliases: | ||||||
| #lcd_type: st7920 |     # EXP1 header | ||||||
| #cs_pin: P1.19 |     EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=<GND>, | ||||||
| #sclk_pin: P1.20 |     EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>, | ||||||
| #sid_pin: P1.18 |     # EXP2 header | ||||||
| #encoder_pins: ^P3.26, ^P3.25 |     EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=<GND>, | ||||||
| #click_pin: ^!P0.28 |     EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=<RST>, EXP2_10=<NC> | ||||||
| # |     # Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp0" | ||||||
| #[output_pin beeper] |  | ||||||
| #pin: P1.30 |  | ||||||
|  |  | ||||||
| # "RepRapDiscount 2004 Smart Controller" type displays | # See the sample-lcd.cfg file for definitions of common LCD displays. | ||||||
| #[display] |  | ||||||
| #lcd_type: hd44780 |  | ||||||
| #rs_pin: P1.19 |  | ||||||
| #e_pin: P1.18 |  | ||||||
| #d4_pin: P1.20 |  | ||||||
| #d5_pin: P1.21 |  | ||||||
| #d6_pin: P1.22 |  | ||||||
| #d7_pin: P1.23 |  | ||||||
| #encoder_pins: ^P3.26, ^P3.25 |  | ||||||
| #click_pin: ^!P0.28 |  | ||||||
| # |  | ||||||
| #[output_pin beeper] |  | ||||||
| #pin: P1.30 |  | ||||||
|  |  | ||||||
| # 128x64 Full Graphic Creality CR10 / ENDER 3 stockdisplay |  | ||||||
| #[display] |  | ||||||
| #lcd_type: st7920 |  | ||||||
| #cs_pin: P1.19 |  | ||||||
| #sclk_pin: P1.21 |  | ||||||
| #sid_pin: P1.23 |  | ||||||
| #encoder_pins: ^P1.18, ^P1.20 |  | ||||||
| #click_pin: !P0.28 |  | ||||||
| # |  | ||||||
| #[output_pin beeper] |  | ||||||
| #pin: P1.30 |  | ||||||
|  |  | ||||||
| # MKS Mini 12864 LCD. |  | ||||||
| # Make sure that the EXP1 and EXP2 are rotated correctly on the |  | ||||||
| # display board. The cutouts on the connectors should be towards the |  | ||||||
| # center of the PCB. See: |  | ||||||
| #   https://reprap.org/wiki/MKS_MINI_12864#Physical_Interface |  | ||||||
| # If they are wrong, the connector housing can be pried off carefully |  | ||||||
| # with a small screwdriver and relocated the correct way. |  | ||||||
| # |  | ||||||
| #[display] |  | ||||||
| #lcd_type: uc1701 |  | ||||||
| #cs_pin: P1.21 |  | ||||||
| #a0_pin: P1.22 |  | ||||||
| #contrast: 40 |  | ||||||
| #encoder_pins: ^P3.25, ^P3.26 |  | ||||||
| #click_pin: ^!P0.28 |  | ||||||
| # |  | ||||||
| #[output_pin beeper] |  | ||||||
| #pin: P1.30 |  | ||||||
|   | |||||||
| @@ -134,14 +134,15 @@ max_z_accel: 100 | |||||||
| [static_digital_output led] | [static_digital_output led] | ||||||
| pins: !PC26 | pins: !PC26 | ||||||
|  |  | ||||||
| # "RepRapDiscount 128x64 Full Graphic Smart Controller" type displays | # EXP1 / EXP2 (display) pins | ||||||
| #[display] | [board_pins] | ||||||
| #lcd_type: st7920 | aliases: | ||||||
| #cs_pin: PC9 |     # EXP1 header | ||||||
| #sclk_pin: PA2 |     EXP1_1=PA15, EXP1_3=PA6, EXP1_5=PA2,  EXP1_7=<NC>, EXP1_9=<GND>, | ||||||
| #sid_pin: PA6 |     EXP1_2=PA7,  EXP1_4=PC9, EXP1_6=<NC>, EXP1_8=<NC>, EXP1_10=<5V>, | ||||||
| #encoder_pins: ^PC3, ^PB5 |     # EXP2 header | ||||||
| #click_pin: ^!PA7 |     EXP2_1=PA5, EXP2_3=PC3,  EXP2_5=PB5, EXP2_7=<NC>,  EXP2_9=<GND>, | ||||||
| # |     EXP2_2=PA2, EXP2_4=PB13, EXP2_6=PA6, EXP2_8=<RST>, EXP2_10=<NC> | ||||||
| #[output_pin BEEPER_pin] |     # Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "usart0" | ||||||
| #pin: PA15 |  | ||||||
|  | # See the sample-lcd.cfg file for definitions of common LCD displays. | ||||||
|   | |||||||
| @@ -108,19 +108,15 @@ pins: | |||||||
| [static_digital_output yellow_led] | [static_digital_output yellow_led] | ||||||
| pins: !PB7 | pins: !PB7 | ||||||
|  |  | ||||||
| # "RepRapDiscount 2004 Smart Controller" type displays | # Common EXP1 / EXP2 (display) pins | ||||||
| #[display] | [board_pins] | ||||||
| #lcd_type: hd44780 | aliases: | ||||||
| #rs_pin: PG4 |     # Common EXP1/EXP2 headers found on RAMBo v1.4 | ||||||
| #e_pin: PG3 |     EXP1_1=PE6, EXP1_3=PG3, EXP1_5=PJ2, EXP1_7=PJ7, EXP1_9=<GND>, | ||||||
| #d4_pin: PJ2 |     EXP1_2=PE2, EXP1_4=PG4, EXP1_6=PJ3, EXP1_8=PJ4, EXP1_10=<5V>, | ||||||
| #d5_pin: PJ3 |     # EXP2 header | ||||||
| #d6_pin: PJ7 |     EXP2_1=PB3, EXP2_3=PJ5, EXP2_5=PJ6, EXP2_7=PD4, EXP2_9=<GND>, | ||||||
| #d7_pin: PJ4 |     EXP2_2=PB1, EXP2_4=PB0, EXP2_6=PB2, EXP2_8=PE7, EXP2_10=PH2 | ||||||
|  |     # Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi" | ||||||
|  |  | ||||||
| # "RepRapDiscount 128x64 Full Graphic Smart Controller" type displays | # See the sample-lcd.cfg file for definitions of common LCD displays. | ||||||
| #[display] |  | ||||||
| #lcd_type: st7920 |  | ||||||
| #cs_pin: PG4 |  | ||||||
| #sclk_pin: PJ2 |  | ||||||
| #sid_pin: PG3 |  | ||||||
|   | |||||||
| @@ -83,33 +83,16 @@ max_accel: 3000 | |||||||
| max_z_velocity: 5 | max_z_velocity: 5 | ||||||
| max_z_accel: 100 | max_z_accel: 100 | ||||||
|  |  | ||||||
| # "RepRapDiscount 2004 Smart Controller" type displays | # Common EXP1 / EXP2 (display) pins | ||||||
| #[display] | [board_pins] | ||||||
| #lcd_type: hd44780 | aliases: | ||||||
| #rs_pin: ar16 |     # Common EXP1 header found on many "all-in-one" ramps clones | ||||||
| #e_pin: ar17 |     EXP1_1=ar37, EXP1_3=ar17, EXP1_5=ar23, EXP1_7=ar27, EXP1_9=<GND>, | ||||||
| #d4_pin: ar23 |     EXP1_2=ar35, EXP1_4=ar16, EXP1_6=ar25, EXP1_8=ar29, EXP1_10=<5V>, | ||||||
| #d5_pin: ar25 |     # EXP2 header | ||||||
| #d6_pin: ar27 |     EXP2_1=ar50, EXP2_3=ar31, EXP2_5=ar33, EXP2_7=ar49, EXP2_9=<GND>, | ||||||
| #d7_pin: ar29 |     EXP2_2=ar52, EXP2_4=ar53, EXP2_6=ar51, EXP2_8=ar41, EXP2_10=<RST> | ||||||
| #encoder_pins: ^ar31, ^ar33 |     # Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi" | ||||||
| #click_pin: ^!ar35 |     # Note, some boards wire: EXP2_8=<RST>, EXP2_10=ar41 | ||||||
|  |  | ||||||
| # "RepRapDiscount 128x64 Full Graphic Smart Controller" type displays | # See the sample-lcd.cfg file for definitions of common LCD displays. | ||||||
| #[display] |  | ||||||
| #lcd_type: st7920 |  | ||||||
| #cs_pin: ar16 |  | ||||||
| #sclk_pin: ar23 |  | ||||||
| #sid_pin: ar17 |  | ||||||
| #encoder_pins: ^ar31, ^ar33 |  | ||||||
| #click_pin: ^!ar35 |  | ||||||
| #kill_pin: ^!ar41 |  | ||||||
|  |  | ||||||
| # 128x64 Full Graphic Creality CR10 / ENDER 3 stockdisplay |  | ||||||
| #[display] |  | ||||||
| #lcd_type: st7920 |  | ||||||
| #cs_pin: ar27 |  | ||||||
| #sclk_pin: ar25 |  | ||||||
| #sid_pin: ar29 |  | ||||||
| #encoder_pins: ^ar23, ^ar17 |  | ||||||
| #click_pin: ^!ar35 |  | ||||||
|   | |||||||
							
								
								
									
										91
									
								
								config/sample-lcd.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								config/sample-lcd.cfg
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,91 @@ | |||||||
|  | # This file provides example configuration for common "RepRap" style | ||||||
|  | # LCD displays that use EXP1/EXP2 plugs. | ||||||
|  | # | ||||||
|  | # To configure a display from this file, make sure the main | ||||||
|  | # printer.cfg file has a [board_pins] config section defining pin | ||||||
|  | # aliases for the EXP1/EXP2 plugs, find the appropriate LCD type in | ||||||
|  | # this file, and then copy-and-paste that section into printer.cfg. | ||||||
|  | # | ||||||
|  | # See the "example-extras.cfg" file for description of config parameters. | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ###################################################################### | ||||||
|  | # "RepRapDiscount 128x64 Full Graphic Smart Controller" type displays | ||||||
|  | ###################################################################### | ||||||
|  |  | ||||||
|  | [display] | ||||||
|  | lcd_type: st7920 | ||||||
|  | cs_pin: EXP1_4 | ||||||
|  | sclk_pin: EXP1_5 | ||||||
|  | sid_pin: EXP1_3 | ||||||
|  | encoder_pins: ^EXP2_3, ^EXP2_5 | ||||||
|  | click_pin: ^!EXP1_2 | ||||||
|  | #kill_pin: ^!EXP2_8 | ||||||
|  |  | ||||||
|  | [output_pin beeper] | ||||||
|  | pin: EXP1_1 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ###################################################################### | ||||||
|  | # "RepRapDiscount 2004 Smart Controller" type displays | ||||||
|  | ###################################################################### | ||||||
|  |  | ||||||
|  | [display] | ||||||
|  | lcd_type: hd44780 | ||||||
|  | rs_pin: EXP1_4 | ||||||
|  | e_pin: EXP1_3 | ||||||
|  | d4_pin: EXP1_5 | ||||||
|  | d5_pin: EXP1_6 | ||||||
|  | d6_pin: EXP1_7 | ||||||
|  | d7_pin: EXP1_8 | ||||||
|  | encoder_pins: ^EXP2_3, ^EXP2_5 | ||||||
|  | click_pin: ^!EXP1_2 | ||||||
|  | #kill_pin: ^!EXP2_8 | ||||||
|  |  | ||||||
|  | [output_pin beeper] | ||||||
|  | pin: EXP1_1 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ###################################################################### | ||||||
|  | # 128x64 Full Graphic Creality CR10 / ENDER 3 stockdisplay | ||||||
|  | ###################################################################### | ||||||
|  |  | ||||||
|  | [display] | ||||||
|  | lcd_type: st7920 | ||||||
|  | cs_pin: EXP1_7 | ||||||
|  | sclk_pin: EXP1_6 | ||||||
|  | sid_pin: EXP1_8 | ||||||
|  | encoder_pins: ^EXP1_5, ^EXP1_3 | ||||||
|  | click_pin: ^!EXP1_2 | ||||||
|  |  | ||||||
|  | [output_pin beeper] | ||||||
|  | pin: EXP1_1 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ###################################################################### | ||||||
|  | # MKS Mini 12864 LCD | ||||||
|  | ###################################################################### | ||||||
|  |  | ||||||
|  | # Make sure that the EXP1 and EXP2 are rotated correctly on the | ||||||
|  | # display board. The cutouts on the connectors should be towards the | ||||||
|  | # center of the PCB. See: | ||||||
|  | #   https://reprap.org/wiki/MKS_MINI_12864#Physical_Interface | ||||||
|  | # If they are wrong, the connector housing can be pried off carefully | ||||||
|  | # with a small screwdriver and relocated the correct way. | ||||||
|  |  | ||||||
|  | [display] | ||||||
|  | lcd_type: uc1701 | ||||||
|  | cs_pin: EXP1_6 | ||||||
|  | a0_pin: EXP1_7 | ||||||
|  | contrast: 40 | ||||||
|  | encoder_pins: ^EXP2_3, ^EXP2_5 | ||||||
|  | click_pin: ^!EXP1_2 | ||||||
|  | ## Some micro-controller boards may require an spi bus to be specified: | ||||||
|  | #spi_bus: spi | ||||||
|  | ## Alternatively, some micro-controller boards may work with software spi: | ||||||
|  | #spi_software_miso_pin: EXP2_1 | ||||||
|  | #spi_software_mosi_pin: EXP2_6 | ||||||
|  | #spi_software_sclk_pin: EXP2_2 | ||||||
|  |  | ||||||
|  | [output_pin beeper] | ||||||
|  | pin: EXP1_1 | ||||||
		Reference in New Issue
	
	Block a user