Based upon this discussion regarding interrupts, it would appear to be very possible to handle something that is 0.1-0.5 kbps.
As with many things on this platform, there are many potential ways to make this happen. From the simplest to the most complex, one could do this with pigpio or one could code a kernel module to function as an interrupt service routine.
From what you have described, the timing seems to be:
GPIO Logic Probe Screen
DRDY 2 __/¯~¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯~¯\_______
DCLK 3 ____~_/¯\_/¯\_/¯\_/¯\_/¯\_/¯\_/¯\_/¯\_~_________
DOUT 4 ____~_/¯\_____/¯\_________/¯\_/¯\_____~_________
handler A B B B B B B B B B B B B B B B B A
Note: Sub A sets/ clears the receive state, B receives the data
Pseudocode for bit-banging: (since your development environment was not stated)
#include <pigpio.h>
const int pinDRDY = 2;
const int pinCLK = 3;
const int pinData = 4;
bool myDRDY;
int myData;
sub init() {
gpioInitialise();
# Set pins to input
gpioSetMode(pinDRDY, 0);
gpioSetMode(pinCLK, 0);
gpioSetMode(pinData, 0);
# Set "interrupt" handler for data ready pin
if (gpioSetAlertFunc(pinDRDY, interruptDataRready()) != 0) {
# Bad GPIO, gracefully crash
exit;
}
# GPIO "interrupt" pin is set, wait for callback for data ready
}
sub interruptDataReady(GPIO, level, tick) {
myDRDY = level;
if (myDRDY == true) {
# Transition low to high, prepare for receiving new data
# Set "interrupt" handler for clock
if (gpioSetAlertFunc(pinCLK, interruptClockPulse()) != 0) {
# A different bad GPIO, turn off data handler, gracefully crash
gpioSetAlertFunc(pinCLK, null);
exit;
}
else {
# Set "interrupt" handler for clock, initialize for new data byte
myData = 0
}
else {
# Transition high to low, first disable the clock handler
gpioSetAlertFunc(pinCLK, null);
# Next, send the data out somewhere
doSomething();
}
}
sub interruptClockPulse(GPIO, level, tick) {
# For example purposes, reads data upon the rising edge
int intNewBit;
if (level == 1) {
# Rising clock edge, reads one bit of data
# Shift data left one bit
myData << 1;
# Read data
intNewBit = gpioRead(pinData);
if (intNewBit == 1) {
myData = myData | 1;
else {
# Either bad GPIO pin or zero bit, nothing to do
}
else {
# Falling clock edge, nothing to do
}
}
sub doSomething(){
# Do something
debug.print(myData);
}
bitstream
, not bytestream