Im trying SPI example. I can send data from master to slave but when I want read data from slave data is 0 always. I checked SCK pin. when Im sending SCK is generating clock pulse but when Im reading there is no. how it must be ? what should I do for read from slave.
Thank u
Are you using ASM? Reading and writing are one and the same... The serial comunication is a ring The master clocks into the slave as the slave clocks back... The first byte sent from the slave is a dummy.
The send and receive happen at the same time; i.e. as the data to be sent (which may be a dummy byte, e.g. 0) is clocked out, the data to be read is clocked in. So to read a byte, you have to send one. Once the master has finished sending a byte, it will have finished receiving a byte also.
so when Im sending Im putting SSP1BUF.. and when slave send some data also it will come to SSP1BUF ? and also I checked SCK pin with oscilloscope. when Im sending there is pulse but after there is nothing. my question is ; it must be like this or when slave is sending must be clock pulses in SCK ?
so when Im sending Im putting SSP1BUF.. and when slave send some data also it will come to SSP1BUF ? and also I checked SCK pin with oscilloscope. when Im sending there is pulse but after there is nothing. my question is ; it must be like this or when slave is sending must be clock pulses in SCK ?
The master generates the SCK pulses, and the slave cannot send anything to the master without these pulses. For the master to pulse the SCK line, it must start a transmission (e.g. send something). At the same time the master is transmitting it is also receiving whatever the slave is sending.
The master generates the SCK pulses, and the slave cannot send anything to the master without these pulses. For the master to pulse the SCK line, it must start a transmission (e.g. send something). At the same time the master is transmitting it is also receiving whatever the slave is sending.
Im working with CC113L.when I send some command to it it must reply me some answer.when Im sending there is SCK and also there is data in SDI. but it must be after my command. CC113L must see what I sent and after it will send answer. but after my data to it there is no SCK. but must be SCK yes ? so how I can generate SCK for read this data ?
I used firstly CC115L for send packets and I did it. I can send and I can read from SmartRF software. Im trying read this packets from my card with CC113L. but I dont know where is problem..it came correct 2 times in 1000 test..Maybe I should know about how reading. It looks like so much complicated for me