Hi Ben
With the SPI GetBytAarray I can very confortable read all the bit's from the ADS1299 from Ti.
But the master OUT give always somthing to the DIN from the ADS1299. Thats a problem for the ADS1299. It changed the config of the ADS1299.
On the diagram is no signal expected.
How can I stop it?
regards
Stefan
SPI read 216 Bit problem
Moderator: Benj
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SPI read 216 Bit problem
Hi Stefan,
An SPI operation is bi-directional in that you always simultaneously read and write data at the same time. Usually only one of these is meaningful hence the read and write operations.
So when you are reading data the SPI will be writing data too, 0x55 I believe.
Do you need an alternative value on the output, I could maybe make the dummy send value editable?
The CAL SPI component gives you access to the read/write function allowing you to read and also specify the outgoing byte value if you want to test this fixes the problem.
An SPI operation is bi-directional in that you always simultaneously read and write data at the same time. Usually only one of these is meaningful hence the read and write operations.
So when you are reading data the SPI will be writing data too, 0x55 I believe.
Do you need an alternative value on the output, I could maybe make the dummy send value editable?
The CAL SPI component gives you access to the read/write function allowing you to read and also specify the outgoing byte value if you want to test this fixes the problem.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
Re: SPI read 216 Bit problem
Hi Ben
The Spi I use is a software SPI. If I can try with a dummy 0x00 this would be a great help.
This selection could be a function for FC8 SPI component maybe.
regards
Stefan
The Spi I use is a software SPI. If I can try with a dummy 0x00 this would be a great help.
This selection could be a function for FC8 SPI component maybe.
regards
Stefan
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
Re: SPI read 216 Bit problem
Hi Ben
I found in the C-Code the part with the Master_Byte_1(0x55)
I also add the cal_spi and can see the Master_Byte.
But how I can change it ?
regards
Stefan
I found in the C-Code the part with the Master_Byte_1(0x55)
I also add the cal_spi and can see the Master_Byte.
But how I can change it ?
regards
Stefan
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
Re: SPI read 216 Bit problem
Hi Ben
I do not know how I can change the byte so that I can do a test.
regards
Stefan
I do not know how I can change the byte so that I can do a test.
regards
Stefan
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
Re: SPI read 216 Bit problem
Hi Ben
The Ad converter has 6 channel with 24bit. I can setup the AD-converter from initial 500Hz sampling-rate to 2000Hz sampling-rate.
If I read 2 channel (6Byte) every thin looks fine.
But if I read 3 channel (9Byte) the AD converter lose the config from channel 1 !
I tried to change the dummy Byte from the SPI but I cant do it.....
So I add after reading 2 channel a write 3Byte dummy data.
If the dummy was 0x55 the channel 1 goes to "inital" samplyng rate.
But if the dummy was 0x00 every thing is fine.
For me is very importen to change the dummy to 0x00 and on the board I have 3 Spi Bus what make it not easyer...
regards
Stefan
The Ad converter has 6 channel with 24bit. I can setup the AD-converter from initial 500Hz sampling-rate to 2000Hz sampling-rate.
If I read 2 channel (6Byte) every thin looks fine.
But if I read 3 channel (9Byte) the AD converter lose the config from channel 1 !
I tried to change the dummy Byte from the SPI but I cant do it.....
So I add after reading 2 channel a write 3Byte dummy data.
If the dummy was 0x55 the channel 1 goes to "inital" samplyng rate.
But if the dummy was 0x00 every thing is fine.
For me is very importen to change the dummy to 0x00 and on the board I have 3 Spi Bus what make it not easyer...
regards
Stefan
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
Re: SPI read 216 Bit problem
Hi Ben
Ok Now I understand how to use CAL SPI and changed the spi to this...
And it's working fine. All the six channel. Perfect.
Thank you for the help
regards
Stefan
Ok Now I understand how to use CAL SPI and changed the spi to this...
And it's working fine. All the six channel. Perfect.
Thank you for the help
regards
Stefan
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SPI read 216 Bit problem
Hi Stefan,
Excellent glad it's working well for you now and thanks for letting us know.
Excellent glad it's working well for you now and thanks for letting us know.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel