Forum Discussion
Altera_Forum
Honored Contributor
16 years agohow to interface SPI with altera using state machines!?
http://i714.photobucket.com/albums/ww143/littocookie/waveform.jpg hi! I'm new to using the quartus II software and altera so i'm learning as i go along, right now I want to interface the ...
Altera_Forum
Honored Contributor
16 years agoIt can basically work with a state machine. In my opinion, using a shift register and a bit counter is a more simple solution. See attached an example sending 24 bit data with SPI mode 1. Consider that your chip needs 16 bits and SPI mode 0. The code is generating a SPICLK of half the system clock, which should be suitable for most newer chips.