+ Post New Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 31
  1. #1
    Junior Member level 1
    Points: 224, Level: 2
    sindredit's Avatar
    Join Date
    Feb 2012
    Posts
    16
    Helped
    0 / 0
    Points
    224
    Level
    2

    Cyclone IV DE0-Nano USB in C#

    Hi,

    I am have bought a FPGA main board called Cyclone IV DE0-Nano Development and Education Board.

    The card has accelerometer, so I want to create a program in C# that reads the cards accelerometer data via USB in real time and then draws a graph.
    I am familiar with drawing the graph, but I am unsure on how to build the USB-interface.

    I havent actually begun learning much yet, so am looking for direction on where to start and perhaps where from there on, from people who are already well aware of the latest technologies.

    Any help or advice would be greatly appreciated.

  2. #2
    Full Member level 5
    Points: 1,965, Level: 10
    digi001's Avatar
    Join Date
    Apr 2011
    Posts
    244
    Helped
    22 / 22
    Points
    1,965
    Level
    10

    Re: Cyclone IV DE0-Nano USB in C#

    When you say real-time, do you really mean real-time, or fast enough to not see a noticeable lag on the screen? There is a very big difference.

    How fast do you want to sample the accelerometer?


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  3. #3
    Junior Member level 1
    Points: 224, Level: 2
    sindredit's Avatar
    Join Date
    Feb 2012
    Posts
    16
    Helped
    0 / 0
    Points
    224
    Level
    2

    Re: Cyclone IV DE0-Nano USB in C#

    Thank you for your reply digi001.

    That is not very important. I just need the data from the card to draw a graph. So I guess that if I just can get any data at all then I would be very happy



  4. #4
    Advanced Member level 5
    Points: 13,109, Level: 27
    Achievements:
    7 years registered

    Join Date
    Aug 2011
    Posts
    2,605
    Helped
    304 / 304
    Points
    13,109
    Level
    27

    Re: Cyclone IV DE0-Nano USB in C#

    Isn't the Accelerometer connected to the FPGA and not to the PC side ?


    2 members found this post helpful.

  5. #5
    Junior Member level 1
    Points: 224, Level: 2
    sindredit's Avatar
    Join Date
    Feb 2012
    Posts
    16
    Helped
    0 / 0
    Points
    224
    Level
    2

    Re: Cyclone IV DE0-Nano USB in C#

    Hello, Yes, the accelerometer is a chip in the card. However, it is possible to get the data into a PC program. The control panel that are on the CD has this feature.
    Click image for larger version. 

Name:	419556_10150696193769669_605069668_11059876_737055961_n.jpg 
Views:	12 
Size:	89.7 KB 
ID:	70073

    I've read that if you use the DLL that followed this control panel, then this is possible. I'm not sure if this is true though..



  6. #6
    Advanced Member level 5
    Points: 13,109, Level: 27
    Achievements:
    7 years registered

    Join Date
    Aug 2011
    Posts
    2,605
    Helped
    304 / 304
    Points
    13,109
    Level
    27

    Re: Cyclone IV DE0-Nano USB in C#

    Does the board have USB to UART ?


    2 members found this post helpful.

  7. #7
    Junior Member level 1
    Points: 224, Level: 2
    sindredit's Avatar
    Join Date
    Feb 2012
    Posts
    16
    Helped
    0 / 0
    Points
    224
    Level
    2

    Re: Cyclone IV DE0-Nano USB in C#

    shaik, I am unsure what UART is..



    •   AltAdvertisement

        
       

  8. #8
    Full Member level 5
    Points: 1,965, Level: 10
    digi001's Avatar
    Join Date
    Apr 2011
    Posts
    244
    Helped
    22 / 22
    Points
    1,965
    Level
    10

    Re: Cyclone IV DE0-Nano USB in C#

    Looking at the data sheet it doesn't look like there isn't a USB-to-UART interface. This would make it easier since you would just setup your C# program to communicate with a COM port.

    It looks like Altera is using the JTAG Blaster link as their communications link. This may a little different to setup but I would recommend loading up the Altera project file for their GUI and inspecting the file to see how they do it.

    ---------- Post added at 11:05 ---------- Previous post was at 11:02 ----------

    UART is a standard piece of hardware that manages sending serial communications from say a PC to a embedded device. It manages bringing the serial data, then translates it to parallel data, then the FPGA when the data is ready so it can be read in one read.

    ---------- Post added at 11:06 ---------- Previous post was at 11:05 ----------

    Your serial port on your computer has a UART. Since serial ports have been going away, USB-to-UART is a bridge that makes a virtual serial port/UART over USB. You dont have to deal with overhead of USB protocol you can just deal with it like any other COM port.


    1 members found this post helpful.

  9. #9
    Junior Member level 1
    Points: 224, Level: 2
    sindredit's Avatar
    Join Date
    Feb 2012
    Posts
    16
    Helped
    0 / 0
    Points
    224
    Level
    2

    Re: Cyclone IV DE0-Nano USB in C#

    Im sorry that I dont understand it yet digi001,
    Where can I find the Altera project file for their GUI? Do you mean the control panel? This is a exe-file, so it can not be edited.
    Thanks



  10. #10
    Advanced Member level 5
    Points: 13,109, Level: 27
    Achievements:
    7 years registered

    Join Date
    Aug 2011
    Posts
    2,605
    Helped
    304 / 304
    Points
    13,109
    Level
    27

    Re: Cyclone IV DE0-Nano USB in C#

    digi001 ,
    Where do the USB traces from the USB connector go on the DE0 PCB ?


    2 members found this post helpful.

    •   AltAdvertisement

        
       

  11. #11
    Full Member level 5
    Points: 1,965, Level: 10
    digi001's Avatar
    Join Date
    Apr 2011
    Posts
    244
    Helped
    22 / 22
    Points
    1,965
    Level
    10

    Re: Cyclone IV DE0-Nano USB in C#

    I mean the FPGA configuration file you need to load to test out the GUI. This should be editable correct? Here you may see what communications strategy they used for talking to the GUI.

    It would also be very helpful if you could see the .exe for the GUI. But unfortunately you cant. If they are somehow making a virtual COM port you could try downloading a Serial Sniffer program which will show you what activity is going over your serial port.


    1 members found this post helpful.

  12. #12
    Advanced Member level 5
    Points: 13,109, Level: 27
    Achievements:
    7 years registered

    Join Date
    Aug 2011
    Posts
    2,605
    Helped
    304 / 304
    Points
    13,109
    Level
    27

    Re: Cyclone IV DE0-Nano USB in C#

    Me too can't find any info regarding a UART on the DE0 datasheet.
    However, if you enlarge the top picture
    http://www.terasic.com.tw/cgi-bin/pa...o=593&PartNo=3

    You'll be able to see a chip with the FTDI logo. This can be it.

    ---------- Post added at 18:24 ---------- Previous post was at 18:20 ----------

    My point is:
    Without a USB to "something an FPGA can understand" converter - the USB conncector seems to be useless. I strongly doubt it.


    2 members found this post helpful.

  13. #13
    Full Member level 5
    Points: 1,965, Level: 10
    digi001's Avatar
    Join Date
    Apr 2011
    Posts
    244
    Helped
    22 / 22
    Points
    1,965
    Level
    10

    Re: Cyclone IV DE0-Nano USB in C#

    shaiko,

    havent been able to find a schematic just yet.

    ---------- Post added at 11:27 ---------- Previous post was at 11:25 ----------

    Yes. But couldnt it be USB-to-JTAG Blaster? This wouldnt be the same as USB-to-UART


    1 members found this post helpful.

  14. #14
    Advanced Member level 5
    Points: 13,109, Level: 27
    Achievements:
    7 years registered

    Join Date
    Aug 2011
    Posts
    2,605
    Helped
    304 / 304
    Points
    13,109
    Level
    27

    Re: Cyclone IV DE0-Nano USB in C#

    Just searched it up.
    The chip has FTDI245 written on it.
    It's a USB FIFO IC - don't think it does the conversion.

    But if you look at the bottom picture at the same link that shows the bottom side of the PCB - you'll see a black IC ( just right to the SRAM ). Altough it's on the bottom side, it's physically close to the USB connector. I think that's the magic component that makes PC to FPGA connectivity possible.
    Unfortunately it's impossible to see any writing on it.

    sindredit,
    please provide the schematics or tell us what's printed on that IC


    2 members found this post helpful.

  15. #15
    Junior Member level 1
    Points: 224, Level: 2
    sindredit's Avatar
    Join Date
    Feb 2012
    Posts
    16
    Helped
    0 / 0
    Points
    224
    Level
    2

    Re: Cyclone IV DE0-Nano USB in C#

    digi001: Before I start the control panel I run a bat-file:
    quartus_pgm.exe -m jtag -c USB-Blaster[USB-0] -o "p;DE0_Nano_ControlPanel.sof"
    Click image for larger version. 

Name:	jtag.jpg 
Views:	7 
Size:	483.4 KB 
ID:	70074



  16. #16
    Advanced Member level 5
    Points: 13,109, Level: 27
    Achievements:
    7 years registered

    Join Date
    Aug 2011
    Posts
    2,605
    Helped
    304 / 304
    Points
    13,109
    Level
    27

    Re: Cyclone IV DE0-Nano USB in C#


    sindredit, please tell us what you see on the component I marked with a red circle


    2 members found this post helpful.

  17. #17
    Junior Member level 1
    Points: 224, Level: 2
    sindredit's Avatar
    Join Date
    Feb 2012
    Posts
    16
    Helped
    0 / 0
    Points
    224
    Level
    2

    Re: Cyclone IV DE0-Nano USB in C#

    On the back side:
    Altera
    EPM240
    M100C4N
    C1113
    VAL9M5089

    3N1NA 1GOE

    On the front side:
    FTDI
    FT245BI
    1113



  18. #18
    Advanced Member level 5
    Points: 13,109, Level: 27
    Achievements:
    7 years registered

    Join Date
    Aug 2011
    Posts
    2,605
    Helped
    304 / 304
    Points
    13,109
    Level
    27

    Re: Cyclone IV DE0-Nano USB in C#

    What is written on this component ?
    http://images.elektroda.net/41_1330706622.jpg
    the one marked in red.

    Please provide ALL what's written on this component ONLY


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  19. #19
    Junior Member level 1
    Points: 224, Level: 2
    sindredit's Avatar
    Join Date
    Feb 2012
    Posts
    16
    Helped
    0 / 0
    Points
    224
    Level
    2

    Re: Cyclone IV DE0-Nano USB in C#

    Altera
    EPM240
    M100C4N
    C1113
    VAL9M5089



  20. #20
    Advanced Member level 5
    Points: 13,109, Level: 27
    Achievements:
    7 years registered

    Join Date
    Aug 2011
    Posts
    2,605
    Helped
    304 / 304
    Points
    13,109
    Level
    27

    Re: Cyclone IV DE0-Nano USB in C#

    That's a part number for a MAX II CPLD. I really don't know what it's functionality on the board.
    Can you provide the schematics and pinout of the FPGA ?



--[[ ]]--