Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAbility to set speed in shiftIn & shiftOut #83
Comments
Ping.. |
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up
Ping.. |
While the clock speeds of various Microcontrollers increase, the speed of the shiftIn and shiftOut also increases. This creates a problem when communicating with slower devices. It could be interesting to add an optional argument to these functions so they reliably work with slower devices. Just like with the SPI hardware library where you can set the maximum SPI speed. https://www.arduino.cc/en/Reference/SPI
I had this problem when I was trying to use the 'normal' library for the HX711 load cell amp with an ESP32.
bogde/HX711#75
The interface could look like this:
Where a maxSpeed of 0 would mean that it would use the full speed of the microcontroller. Otherwise you could define the speed as frequency (15Mhz -> 15000000) just like in the SPI hardware library.
In this way Arduino would be future-proof without losing backwards compatibility.