mgate
Full Member level 4
At first observation I can see several bugs:
1-The DataBusy Routine is looping for ever...
2- I think You can not poll Data busy flag before set cs low...
3- You are reseting the chip on the loop.. I Don't know if you should
for now I suggest for you to correct the data not ready and try to see what you get .. So replace code from line 19 to line 30 with
1-The DataBusy Routine is looping for ever...
2- I think You can not poll Data busy flag before set cs low...
3- You are reseting the chip on the loop.. I Don't know if you should
for now I suggest for you to correct the data not ready and try to see what you get .. So replace code from line 19 to line 30 with
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 void DataNotReady() { int ready=digitalRead(drdy); while(ready) { delayMicroseconds(1); ready=digitalRead(drdy); } }