-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Working version of pin extenders #337
base: Devt
Are you sure you want to change the base?
Conversation
Do you have a reference schematic? |
The datasheet has a reference schematic with all the details on how to use these IC's. I based my board off that: https://www.nxp.com/docs/en/data-sheet/PCA9539_PCA9539R.pdf pg 17. As long as you just use them for a single purpose like I do, these extenders work just fine. Once I finish testing these boards and fixing the bugs I found I can order a bigger batch of boards and send you one as well. I'd be happy to sell them in the EU... I can also design a little 6pack module off these for endstops in due time, it's hardly any effort. |
It was assumed to be the same as SPI types. It no longer needs to be constrained if handler.item has a range.
It was forced to be 50Hz now constrained to 50 to 2000 Hz Some open source BESCs work at higher frequencies.
Solenoid ignore idle ms
Added HBridge Spindle type
Eliminated unnecessary conversions to double precision float
Merge branch 'main' into Devt
Co-authored-by: Stefan de Bruijn <[email protected]>
…er, the update triggers, but the new pin value is not read for some reason.
From a very high level, would this PR be able to handle other I2C extenders ( specifically MCP23017 ) ? |
Hi, can you update this PR from master? |
This PR is a complete implementation for PCA pin extenders. It is tested extensively, on both unit tests and real hardware. The latency that I found on real hardware is typically between 3 and 7 us.
A few other bugs have been fixed in the process. It should also be quite feasible to make other types of [smart] extenders using this code.
At this point, I would say that making a board with a pin extender is quite hard to get right. It's not really the hardware itself that makes it hard, but how pins should be used. For the moment, I would only recommend using the pin extender for endstops, and only if the interrupt pin of the pin extender is wired. Definitely not stepping. Definitely not probing. Other I/O should work, but should not be mixed with endstops. That's hardly a real issue tho, because it frees a lot of GPIO.
It should be relatively easy to add other I2C pin extenders using this code. From all the data sheets that I have seen, they all work the same way, just with other numbers of ports and other addresses. Nothing the code cannot handle.