Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Cyclone IV DE0-Nano USB in C#

Status
Not open for further replies.

sindredit

Junior Member level 1
Joined
Feb 23, 2012
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,374
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.
 

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?
 
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 :)
 

Isn't the Accelerometer connected to the FPGA and not to the PC side ?
 
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.
419556_10150696193769669_605069668_11059876_737055961_n.jpg

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..
 

shaik, I am unsure what UART is..
 

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.
 
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
 

digi001 ,
Where do the USB traces from the USB connector go on the DE0 PCB ?
 
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.
 
Me too can't find any info regarding a UART on the DE0 datasheet.
However, if you enlarge the top picture
https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=139&No=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.
 
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
 
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
 
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"
jtag.jpg
 


sindredit, please tell us what you see on the component I marked with a red circle
 
On the back side:
Altera
EPM240
M100C4N
C1113
VAL9M5089

3N1NA 1GOE

On the front side:
FTDI
FT245BI
1113
 

Altera
EPM240
M100C4N
C1113
VAL9M5089
 

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 ?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top