Jump to content
  • 0

SPI Read/ Write


spillari

Question

Hello, I have been using the SPI read/write commands to talk to a board that I have.

I first write 0x7F = 0x00;

Then I read 0x81 and 0x82 which give me the device part number

image.thumb.png.31de3d5d82ebfb35d461f1c2e07dfce9.png

MicrosoftTeams-image.thumb.png.4fd02c186ef39fbbddd5d93557e3b484.png

 

I am trying to do the same via a sensor script and I only see the first write on the logic analyzer

image.thumb.png.74c671fb405728694c3245caa57c590c.png

image.thumb.png.de09f070778d0cd6377afb071a165547.png

 

Is there something I am doing wrong in the script, because I see a different MISO. 

And is there a way I can see waveforms for the multiple write command outputs in the logic analyzer?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello @attila

Thankyou for that. I am now trying to program a register from a different page. When I try to read back a register on the page (0x0280) I do not see the right value. I seem to have given the command wrong. The register address to read from is 0x280 and was 0x01,0x02 in the previous case. Whereas the data sent and received is still 8 bit .

I am trying to send:

0x02FF = 0x00 (write)

0x0280 (read)

 image.thumb.png.04f6e6fbd48cf2b60a9179339bbd9450.pngimage.thumb.png.508a8f65e163160d93e43e4cca19a493.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...