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

Possible pin conflict #219

Open
knightinlet opened this issue Nov 13, 2021 · 6 comments
Open

Possible pin conflict #219

knightinlet opened this issue Nov 13, 2021 · 6 comments
Labels
[- breakout -] https://shop.pimoroni.com/collections/breakout-garden enhancement New feature or request

Comments

@knightinlet
Copy link

For awareness and to save anyone else hours of investigation. Not sure if it's a bug or a bad combination on my part.

If using the pico breakout garden and RTC (rv3028) and breakout_colourlcd240x240 in the rear SPI slot combination then the display does not display as the default pin interrupt for RV3028 is 22 and the rear SPI CS is also pin 22.

@Gadgetoid
Copy link
Member

Breakout Garden should use pins 4 and 5 for i2c and pin 3 for interrupt, so it should be possible to use these two together.

If you're using MicroPython you can supply an interrupt=3 argument to the RTC constructor to fix this.

Probably need to document this somewhere?

@knightinlet
Copy link
Author

Hi,

Apologies I thought I had responded to share the knowledge. My bad.

At the time I finally figured that if I supplied another value to the constructor to prevent it defaulting to 22 it would solve my problem even if I wasn't using the interrupt feature.

I was using the C++ libraries, but agree something in the docs might be useful for both implementations to help others in the future.

@Gadgetoid
Copy link
Member

I wonder if interrupt should default to -1 and only set up if supplied. Might avoid this in future. It's far from the only board that has an interrupt argument.

@knightinlet
Copy link
Author

That seems like a great design pattern to enable the feature only if needed.

Would have saved me hunting for something I hadn't appreciated was activated outside of the i2c pins.

That said was a great learning experience so thanks 😃

@Gadgetoid Gadgetoid added the enhancement New feature or request label Jan 26, 2022
@knightinlet
Copy link
Author

What I should have said is that I passed RV3028::PIN_UNUSED as part of the constructor. Possibly default it to that and if you need interrupts you supply the PIN number as part of the constructor.

@Gadgetoid
Copy link
Member

Agreed.

Actually in practice there's virtually no point supplying the interrupt pin to the driver at all since it doesn't do anything with it. I might outright remove this parameter and merge some examples of interrupts actually being useful.

To actually use an interrupt in MicroPython you basically have to set it all up again: #169

And I'm pretty sure (although I don't think I've played with pin interrupts) in C++ things are not much different. Interrupts are too messy to handle in the library internals.

@ZodiusInfuser ZodiusInfuser added the [- breakout -] https://shop.pimoroni.com/collections/breakout-garden label Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[- breakout -] https://shop.pimoroni.com/collections/breakout-garden enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants