clau

Members
  • Content Count

    1
  • Joined

  • Last visited

About clau

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. My goal is to send data from the fpga to the pc using DSPI. This data, in this case RGB data, gets transformed into video using Unity. There are, however, several problems with sending data from the fpga to pc. Currently the pc is receiving data from the fpga as follows, From the pc side: Open the device (NexysVideo) using the function DmgrOpen(&hif, "NexysVideo") Enable DSPI transfer using the function DspiEnable(hif) Set the SPI mode using the function DspiSetSpiMode(hif, idMod, fShRight) Set the master (pc) clock frequency using the function DspiSetSpeed(hif, frqReq, &pfrqSet) Set the slave select (SS) to the logic 0 state using the function DspiSetSelect(hif, fSel) Receive bytes from the slave (fpga) using the function DspiGet(hif, fFalse, fFalse, bFill, rgbRcv, cbRcv, fFalse), in a while loop There are several things that are not working properly on the pc side, looking at point 3, the SPI mode I would like to use is mode 1, shift data at the rising edge and sample data at the falling edge. However, I can't use mode 1, and currently using mode 0 (sample data at the rising edge and shift data at the falling edge). Another thing is point 4, setting the SCK clock frequency. I noticed that the maximum clock frequency is 30 MHz. When determining the clock frequency, however, using the fpga the clock frequency is about 12 kHz, which is much lower than I would expect! I checked the clock frequency on the pc side using DspiGetSpeed(...) and got 30 MHz, but clearly the fpga receives a lower frequency. From the fpga side: A shift register is connected to the FT2232H IC, I used the diagram on page 14 from http://www.europractice.stfc.ac.uk/vendors/nexys_video_rm.pdf for the connection layout The clock from the pc to the FT2232H is connected to the shift register If the slave select (SS) signal is a logic 0, then Every clock cycle a bit is shifted into the FT2232H The ultimate goal is to connect a camera, which outputs raw RGB data to the fpga, and feeds it to the pc. To test if transferring something simple works I continuously send the bitstream "111111110000000000000000", which would get translated to 0xFF0000 or the colour red. This however, does not seem to work, it seems as if the pc and fpga are not in sync. The pc receives values per byte such as (0, 127, 128). Is there something I missed?