Search the Community
Showing results for tags 'dspi'.
Found 2 results
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?
I have my proMX7 board running a very simple code that I adapted from Robogaia.com. I use the code to access an LS7366 Quadrature Counter and Rotary Encoder. The proMX7 is also driving an LKM1638 (8 digits LED driver board). I use the LKM1638 as a display output to read the LS7366 count value. Both peripherals are driven via SPI communication and using DSPI virtual object library. I am using two distinct ports, one for each peripheral. JA is connected to the LKM1638 display and JE is connected to the LS7366 counter via pins 1 2 3 4, SS3 SDO3 SDI3 SCK3. The code is very simple. I send a Read request to the LS7366, get the answer from the chip and send a little calculated value to the LKM1638. The calculated value appear on the display. I manually turn the encoder and I can see the actual value on the display change accordingly. It run smoothly and very accurately... until... Now the strangest thing happen when I want my proMX7 to run independently from the desktop computer I use for programming the board. So I just disconnect my USB wire from the computer and suddenly the LS7366 literally stop sending data through MISO->SDI3 ! I put my scope on both the digital outputs from JA to verify signal on the display and found no problem. I repeated the same test on the JE output pins 1 2 4 and found that the digital signal strength goes from 3.4Vpeak to as low as 2.7Vpeak. Obviously, 2.7V is not enough to drive the LS7366 counter, hence, no more output since it doesn't receive enough signal input. I have yet to build a circuit to correct the problem electronically ( transistor common base or something like that ). But, the question remains. Why is the SPI3 port looses signal strength when the USB is disconnected ? I know that internally, somehow, the UART is related to USB J2 on the proMX7. I am not knowledge enough to understand the intricate consequences about this relationship but I would certainly like to understand what is happening here. Is it possible that my proMX7 board is defective (I doubt it. Its been running fine for a while now ) ? Furthermore, why is the signal strength from JA is Not loosing strength when the USB from J2 is suddenly disconnected ? By the way, both LS7366 and LKM1638 are driven with JA and JE power pins 12 set to 5Vdc. I had trouble running the LKM1638 display at 3.3V and the LS7366 would run on 3.3V but my encoder would not, so I had to run the counter on the same Vcc as the encoder. I am actually stunned that the LS7366 is able to accept a 3.4Vpeak digital signal when powered with 5V, but hey! it works. Now, I am Not surprised the slightest bit that it wont work with a 2.7Vpeak signal strength. Besides the spec sheet clearly mention a minimum 3.5V logic high. So, the question remains: Why is the JE digital output strength looses 0.7V when the USB J2 is disconnected from the computer ? Is there a solution to this problem ? ( see documents attached ) Thanks for your help anyone ! LS7366MX7.ino LS7366 Quadrature_Counter LSI.pdf