I have a problem with the SPI communication, I send an instruction to read the register but the arduino adds to extra bits like a prefix, so the instruction it's not correct. I don't know why it adds the extra bits. I took a photo of it in the oscilloscope:
const int ss = 10;
const int CLEAR_COUNTER = 0x20;
const int CLEAR_STATUS = 0x30;
const int READ_COUNTER = 0x60;
const int READ_STATUS = 0x70;
const int WRITE_MODE0 = 0x88;
const int WRITE_MODE1 = 0x90;
char str [100];
void loop()
{
unsigned long num;
digitalWrite(ss, LOW);
SPI.transfer(WRITE_MODE0);
SPI.transfer(WRITE_MODE1);
char data [5];
data [0] = 126;
int i = 1;
Since your oscilloscope picture seems to only show the Received Data pin (MISO) and the Select pin (SS) it is impossible to tell from that what is actually being sent. Please add the MOSI and SCLK pins and show a close-up of the first 8 clocks after the SS goes low.