Electronic – The easiest way to transmit data with clock using an MCU

fpgamicrocontrollertrans

Assume you have an MCU running at 80Mhz (Currently working with TI M4)
This MCU has 128kB of memory allocating some data.

What would be the proper way to transmit this data in its raw form (bits only, no start bits, no end bits, no handshake, no acks, no gaps, no protocol) over one of the MCUs pins and a clock on another pin.

I need to reach 20Mhz, minimum 15Mhz. I was thinking of using an FPGA but an MCU would be much easier (and cost effective).

SPI can work at 1/4 the MCU speed so, technically, it is possible to run SPI on Tiva in 20Mhz. but I do not need the SPI protocol…

Best Answer

The SPI peripheral should be the perfect solution for this. Since SPI output on the serial output is 1 for 1 with the data loaded into the transmit register you should be good to go. The main thing to consider is that you get 8 clocks (if dealing with byte data) @ the 20MHz to have the software get the next byte from memory ready to be output.

You may want to investigate. Some MCU's have internal DMA channels built in which can be used to hose data from memory to a peripheral. This would be an excellent way for your application.