Hi Guys,
I've written a fairly simple 8-bit SPI master controller in VHDL. It's nothing special, it has a read and write port, a strobe signal and a status flag. Easy. Now I need to use this peripheral to send a sequence of bytes. This is where I need help.
Let's say I need to send 10 bytes to initialize an external ADC that's connected to this SPI. What's the easiest way of doing this? One way is to write a FSM, but it seems I need three states, just to send one byte:
1. Put byte on write port
2. Set strobe signal to 1
3. Wait for status flag
...
So if I program the FSM this way, I need 30 states just to send 10 bytes. Is there an easier way of doing this?
Thanks,
Ivo