Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SPI interface with FPGA

Status
Not open for further replies.

usafape

Newbie level 4
Joined
Dec 27, 2011
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,319
Hi all,

I am developing a product where the FPGA will have several sub-systems and a micro controller will do some computations and send commands to these several subsystems. The plan is to use registers to tell what each subsystem should do.
The SPI protocol is quite simple. It contains two bytes. The first byte is the address (128) and it contains a read/write bit. The second byte is the information (read or written to the register). I have the SPI code written and simulated, but I am having a hard time trying to figure out the other part (addressing). Could somebody shine me a light on this? I am writing it in Verilog.

Thanks
 

If you have the basic SPI code written, it shouldn't be hard to put a small protocol on it that sends a start byte, address, data, waits for an acknowledge, address, data byte.

That's what basically needs to be done
 
If you have the basic SPI code written, it shouldn't be hard to put a small protocol on it that sends a start byte, address, data, waits for an acknowledge, address, data byte.

That's what basically needs to be done

Thanks,

Do you have any examples on how this handshaking should be done?
 

It won't serve the purpose though. You need to figure out yourselve what needs to be done and then you assign a symbol to it (like 1000_0010 for write register 10, 0000_0010 read register 10, ...)
You can think of a symbols for:
start, stop, read register, write register, ...

This means that every time you send something through your SPI interface, you start with the symbol, then (depending on the complexity) some bytes of data (addresses, real data, ..)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top