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 support for RRW Graphical LCD #646

Open
wants to merge 8 commits into
base: development
Choose a base branch
from

Conversation

brupje
Copy link

@brupje brupje commented Mar 14, 2017

No description provided.

@repetier
Copy link
Owner

Ok, have tried to integrate this in a compatible way. Display id is 27 since 25 was already used and we can not change afterwards, that would make old configs invalid.

Only thing not sure is the sd card handling. Since you have no hardware SS pin on the board it now seems like a mix of several attempts and you globally changed spi handling which would most likely cause problems on other boards. I think the solution active now is hardware spi in sdfat but on HAL this is software spi so it can handle the non standard SS. Please test if it works that way.

The new display is now listed in config tool.

@brupje
Copy link
Author

brupje commented Mar 27, 2017

Ok, have tried to integrate this in a compatible way. Display id is 27 since 25 was already used and we can not change afterwards, that would make old configs invalid.

Fair, I think you want to reflect this in configuration.h as well though. 25 and 26 are missing now.

Only thing not sure is the sd card handling. Since you have no hardware SS pin on the board it now seems like a mix of several attempts and you globally changed spi handling which would most likely cause problems on other boards. I think the solution active now is hardware spi in sdfat but on HAL this is software spi so it can handle the non standard SS.

Root problem is that u8glib v1 does not support hardware SPI on DUE boards, therefor you need to fall back to software SPI when using the graphical LCD. v2 should work as it uses the normal Arduino SPI library, but migrating is not easy. I attempted to make this reflect in HAL.h

Please test if it works that way.
It does not work unfortunately. The SD is still conflicting with the temperature (MAX31855). Ejecting the SD card makes temperature read again. Somehow the LCD is fine though, probably because it does not need to read from that device.
SDSS is still 59,

I am not sure why the HAL implementation is so different from the Arduino SPI library, which implements it nicely I think. Why does HAL touch the SDSS pin anyway in software SPI? It should only touch it when SD card it addressed in SDFat. Why not make it accept a CS pin when call spiBegin(transaction), and work with that until spiEnd(transaction).

@repetier
Copy link
Owner

Originally spi was only used for sd card which leads to several problems with hardware spi. In addition on due the processor uses hardware signaling on CS pins and only 4 special pin numbers are available as slave select pin. SO in the long run we surely need to rework the spi handling in firmware.

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

Successfully merging this pull request may close these issues.

None yet

2 participants