SPI serial output counter or latch?

B

bob

Hello I have been writing some VHDL code for my CoolRunner CPLD.
I am a beginner.
I have made a project that counts events and sends them to a 16-bit
counter. Currently I just look at the binary output.

I would like to latch the counts and serially shift the counts out as
SPI
In hardware I would use a latching shift register like a 74HCT165 and
would use /PL as a chip select and tie CP to SPI_CLK and Q7 to a
buffer then to SPI_MISO Nothing fancy.

So I guess I am asking if anybody has some VHDL code for a parallel in
SPI out latch, or a SPI output counter.

Any help is appreciated.
Martin
 
T

Tim Hubberstey

bob said:
Hello I have been writing some VHDL code for my CoolRunner CPLD.
I am a beginner.
I have made a project that counts events and sends them to a 16-bit
counter. Currently I just look at the binary output.

I would like to latch the counts and serially shift the counts out as
SPI
In hardware I would use a latching shift register like a 74HCT165 and
would use /PL as a chip select and tie CP to SPI_CLK and Q7 to a
buffer then to SPI_MISO Nothing fancy.

So I guess I am asking if anybody has some VHDL code for a parallel in
SPI out latch, or a SPI output counter.

Any help is appreciated.

Check out <http://www.opencores.org/projects.cgi/web/spi/overview>

This is probably more complex than you want/need but it should give you
ideas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,439
Latest member
shasuze

Latest Threads

Top