Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SWSPI support for RRDGLCD on SKR 1.3/1.4 #1494

Closed

Conversation

ewidance
Copy link

This pull request is to add a software spi support for boards where LCD is wired to general IO pins.

Heavily tested on BTT SKR 1.3/1.4 with Reprap Discount Graphic LCD controler. Pinout reviewed with provided schematics : https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT%20SKR%20V1.4/Hardware/BTT%20SKR%20V1.4-SCH.pdf

SWSPI library is based on "SWSPI.cpp/h" , Ella Robotics fork ( https://os.mbed.com/teams/ELLA-Robotics-Inc/code/SWSPI/ ) of Dave Van Wagner job ( https://os.mbed.com/users/davervw/code/SWSPI/ ).

For software Spi, just set channel to -1 :

############################################
# For Software SPI 
panel.spi_channel                    -1      # Software spi mosi = P1_18; miso = P1_21; sclk = P1_20;
panel.spi_cs_pin                   1.19      # CS on SKR 1.3/1.4
panel.spi_frequency              200000      # Needs to reduce spi frequency for emulated rrdglcd
                                             # default : 1 000 000 Hz

panel.encoder_a_pin                3.25!^    # Encoder pin         ; GLCD EXP2 Pin 3
panel.encoder_b_pin                3.26!^    # Encoder pin         ; GLCD EXP2 Pin 5
panel.click_button_pin             0.28!^    # Click button        ; GLCD EXP1 Pin 2
panel.buzz_pin                     1.30      # Pin for buzzer      ; GLCD EXP1 Pin 1
#panel.back_button_pin             0.28!^    # Back button         ; GLCD EXP2 Pin 8
panel.encoder_resolution              4
panel.external_sd                  true      # set to true if there is an extrernal sdcard on the panel
panel.external_sd.spi_channel         0      # On SKR 1.4, wired to spi0 (free).
panel.external_sd.spi_cs_pin       0.16      # set spi chip select for the sdcard (or any spare pin)
panel.external_sd.sdcd_pin         1.31!^    # sd detect signal (set to nc if no sdcard detect) (or any spare pin)
panel.menu_offset                     1      # Some panels will need 1 here
panel.alpha_jog_feedrate           6000      # X jogging feedrate in mm/min
panel.beta_jog_feedrate            6000      # Y jogging feedrate in mm/min
panel.gamma_jog_feedrate           3000      # Z jogging feedrate in mm/min
panel.hotend_temperature            185      # Temp to set hotend when preheat is selected
panel.bed_temperature                60      # Temp to set bed when preheat is selected

This is my first contribution on Smoothieware. I apologize for mistakes.

@wolfmanjm
Copy link
Contributor

wolfmanjm commented Oct 29, 2020

This has already been rejected. I suggest you check previous PRs. #1488
The reason for rejection is the same use of delay_us() is NOT allowed as described in the contribution/programming guidelines.
You may also add this to third party branches if you feel it will be useful to others.
Please do not waste our times by resubmitting stuff you know has already been rejected. Thanks

@wolfmanjm wolfmanjm closed this Oct 29, 2020
@Smoothieware Smoothieware locked as too heated and limited conversation to collaborators Oct 29, 2020
@arthurwolf
Copy link
Contributor

@ewidance There's already a conversation ongoing about this in the original #1488 pull request. If you have something to add, want to talk about something, the correct way to go about it is to comment/participate on that pull request, not to open a new pull request for no reason, that's not a nice way to go about things, multiplying pull requests like this is just making the repository less tidy and messing up with our efforts.

Are we missing something? Is this somehow different or new?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants