Skip to main content

Timeline for How to read data using Arduino SPI

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
Apr 29, 2016 at 9:55 comment added frarugi87 How do you say it is not reliable? The peripheral is full duplex, and according to the way it works the only way to receive data is by sending dummy data. If MOSI is not connected, well, it doesn't matter; note however that you can't use the MOSI pin for other tasks. By the way, did you remember to correctly set the slave select pin of the other peripheral? Did you use the SS pin on the arduino board or another one?
Apr 29, 2016 at 6:10 comment added Lorenz Ardiente I already did that. but the energy chip I am using is STPM10 and it suggests that I should use simplex synchronous SPI where the MOSI is not connected. there is just a timing diagram to switch from reading bytes and writing bytes. When I used SPI.transfer(), The data is not stable and I think not reliable
Apr 29, 2016 at 3:39 review First posts
Apr 29, 2016 at 6:52
Apr 27, 2016 at 13:47 answer added sa_leinad timeline score: 1
Apr 27, 2016 at 13:21 answer added st2000 timeline score: 0
Apr 27, 2016 at 13:07 answer added SoreDakeNoKoto timeline score: 3
Apr 27, 2016 at 12:45 comment added frarugi87 I suggest you to open the examples of the SPI library and check them. Anyway, the code should be byte result[4]; for (i = 0; i < 4; i++) result[i] = SPI.transfer(0x00); and you will find in result the 32 bits you need
Apr 27, 2016 at 12:14 history asked Lorenz Ardiente CC BY-SA 3.0