To answer the question embedded in the code at line 135 in the cpp file, you do not need the delayMicroseconds(1) for a Pico running at 240MHz (PD_SCK is 500nS) in _shiftIn( ) or read( ).
The delay( ) treatment should probably be the same in both places.
It would be useful, however to have an option, as a Teensy 4 and other processors running at > 500MHz are likely to need them in both read( ) and _shiftIn( ).
while (m > 0)
{
// delayMicroSeconds(1) needed for fast processors?
digitalWrite(_clockPin, HIGH);
if(_fast_processor)
delayMicroseconds(1);
digitalWrite(_clockPin, LOW);
if(_fast_processor)
delayMicroseconds(1);
m--;
}
Thanks for the library, it works well!
To answer the question embedded in the code at line 135 in the cpp file, you do not need the delayMicroseconds(1) for a Pico running at 240MHz (PD_SCK is 500nS) in _shiftIn( ) or read( ).
The delay( ) treatment should probably be the same in both places.
It would be useful, however to have an option, as a Teensy 4 and other processors running at > 500MHz are likely to need them in both read( ) and _shiftIn( ).
BTW, I tested the B input and it seems fine.
A pull request will be forthcoming.
I hope this is useful.