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 optional OLED peripheral to ULX3S target #96

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

pepijndevos
Copy link
Contributor

The ULX3S comes with a dedicated header where the user can plug in a SSD1331 or SSD1306 OLED display panel. So while not a built-in part of the board, these pins are definitely specifically for this display. They are also present in the official lpf: https://github.com/emard/ulx3s/blob/master/doc/constraints/ulx3s_v20.lpf

I made the choice to use the SPI mode of the display, rather than the less common I2C mode. In particular since LiteX does not come with an official I2C core, I think this is a defensible choice.

I am not 100% sure if the way I split the pins for the SPI and GPIO lines is idiomatic, but it is convenient. I think the way I faked the MISO is a bit ugly, but not too bad. I chose not to include the CS pin with the SPI pins because as far as I can tell it just becomes a separate register.

It is of course up to the maintainers of this project if support for this extra peripheral should be included. I have just added it for my own pleasure, and figured I'd share the code if it is of interest.

@enjoy-digital enjoy-digital merged commit 623faa9 into litex-hub:master Aug 4, 2020
@enjoy-digital
Copy link
Member

Thanks! This looks fine, happy to merge it. For the MISO, we could improve the SPIMaster make MISO/MOSI optional, but your workaround seems fine and less complicated than adapting the core.

@enjoy-digital
Copy link
Member

I just simplified things a bit with: ee28d7b.

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.

2 participants