Absolute encoder interface

My requirement is to read serial 12 bit data from a encoder from a TI DRV-8412C2KIT. I have to generate 12 clock cycle ( clock rate -10KHz and encoder read cycle-5ms) on digital o/p pin and simultaneously read data bit on digital i/p pin available after every rising clock edge from encoder. How i can realize precise delay while toggling o/p from high to low?


In DRV8412KIT, SPI/GPIO mux pins are not available for the user. Some other GPIO pins are available that i can interface with my absolute encoder but the SPI block in vis-sim cannot be used to configure those pins and hence i am not able to complete the task. please suggest any other way.

Sounds like SPI will do just

Sounds like SPI will do just what you need. Configure as MASTER mode, clock rate 10kHz and the word size to 12 bits. When you want to do a read, write any value to a SPI write block, and the clock line will send out 12 10 kHz cycles, and the SPI read line (SOMI) will read the data on the GPIO connected to the encoder data out pin.