I'm trying to clock in 61 bits which are purely multiplexed data (no communication protocol - pure bits). It has a corresponding clock signal. I've largely had success by running an interrupt routine by taking the clock rising edge and then reading the bit on DATA_PIN, but I fear it is not robust. I do get transients where bits seem to be a little garbled which is what I'm trying to fix.
The clock runs at approximately 60 kHz. The teensy 3.2 is overclocked at 96MHz. This gives me approximately (1 / 60e3 ) / (1 / 96e6) = 1600 clock cycles to obtain the bit before the next rising edge occurs. I'm not entirely sure if this is sufficient.
I know the Arduino has a ShiftIn() function in its API but I do not see one for the Teensy. Does anyone have suggestions for this?
Thanks,
Amar
The clock runs at approximately 60 kHz. The teensy 3.2 is overclocked at 96MHz. This gives me approximately (1 / 60e3 ) / (1 / 96e6) = 1600 clock cycles to obtain the bit before the next rising edge occurs. I'm not entirely sure if this is sufficient.
I know the Arduino has a ShiftIn() function in its API but I do not see one for the Teensy. Does anyone have suggestions for this?
Thanks,
Amar