Spi master

Thread Starter

Optical_Arrest

Joined Nov 14, 2023
1
I am reading data from sensor through spi in verilog. The sensor stores its conversion result in three registers with the address 0XC, 0XD,OXE. To read these 8 bit registers i have to send the adress of the first register then it autoincrements. How to do that eitj multibyte read in
 

russelmann

Joined Oct 28, 2019
4
I believe a sequence like this should work:
MOSI: [CMD],[ADDR],[DUMMY],[DUMMY],[DUMMY]
MISO: [XXX],[XXX],[RD_DATA_1],[RD_DATA_2],[RD_DATA_3]

Where each "[ ... ]" represents a 8 bit transfer ...
 

drjohsmith

Joined Dec 13, 2021
815
I am reading data from sensor through spi in verilog. The sensor stores its conversion result in three registers with the address 0XC, 0XD,OXE. To read these 8 bit registers i have to send the adress of the first register then it autoincrements. How to do that eitj multibyte read in
Many ways to do said, but this might be your easiest,
A) find code for an spi master, try opencores.org etc all
This will probably have a parallel bus and pins for spi,
B) instantiate your code for the spi master in your cide
C) write state machine in your code to drive the spi master,
How long do you have to hand in this homework ?
 
Top