Dragon USB LCD Text sample

Dragon

Dragon USB LCD Text sample

Postby Hank » Sun Mar 13, 2005 5:49 pm

Hi,

I just received my new Dragon board with the optional LCD display and I am trying to test it using the USB LCD text sample that is provided with the board. I have been able to program the board to turn the LED’s on and off so I believe that the USB driver is installed correctly but when I try to communicate with the board using the LCD_text.c program it fails on the following line:

DragonDeviceHandle = CreateFile("\\\\.\\DRAGON_USB-0",
GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);

The LCD_Text.c file had a compile error and I had to change the following line from

HANDLE* DragonDeviceHandle;

To

HANDLE DragonDeviceHandle;

So, I am not sure if the version of the LCD_Text file that I have has been tested and it may have more errors. Perhaps the "\\\\.\\DRAGON_USB-0" parameter in the CreateFile is wrong. Have any of you been able to get this sample to work?

Thank you very much for any help. If you have a fixed version of the LCD_Text file you can send it to me directly at hheidt @ cox . net
Hank
 
Posts: 3
Joined: Sun Mar 13, 2005 5:27 pm

Postby fpga4fun » Mon Mar 14, 2005 6:18 am

1. What version of MSVC are you using?
2. Can you give us more details by "the program fails"? Does the assert fails?
fpga4fun
Site Admin
 
Posts: 837
Joined: Thu Sep 18, 2003 6:47 am

Postby Hank » Mon Mar 14, 2005 6:22 pm

The assert fails. The handle returned by the CreateFile() call is NULL. I am using Visual Studio .Net to build the program but I'll try building the application using Visual Studio 6.0 tonight and if it works I'll update this thread. I am running under Windows XP Professional.
Hank
 
Posts: 3
Joined: Sun Mar 13, 2005 5:27 pm

Postby Hank » Tue Mar 15, 2005 3:36 am

I have it working now. I tried everything on a different computer and the LCD_Text.c application now works when compiled with either VS .Net or VS 6.0.

Perhaps if I re-install the Dragon USB driver it will fix the problem on my previous computer.
Hank
 
Posts: 3
Joined: Sun Mar 13, 2005 5:27 pm

Postby fpga4fun » Tue Mar 15, 2005 5:07 am

Good. Still weird that it didn't work on one computer.
You could check the following:
1. Plug the Dragon board in USB, XP should "beep"
2. Check the Device Manager, the Dragon board should be listed (in the USB section)
fpga4fun
Site Admin
 
Posts: 837
Joined: Thu Sep 18, 2003 6:47 am

Unfamiliar with Visual Studio.NET 2003

Postby inan » Sat Sep 26, 2009 2:26 pm

Hi,

I would like to run LCD_Text.c code but I am not familiar with Visual Studio.NET, what kind of project should I create (MFC, win32, etc)? Is there any specific configuration that has to be done instead default? What am I supposed to see on the screen after application runs succesfully?

I got lost on running this code, thanks for any help. :roll:
inan
 
Posts: 1
Joined: Sat Sep 26, 2009 11:55 am

problems to

Postby tks » Sun Oct 17, 2010 4:28 pm

Hi All,

As a new owner of a Dragon PCI, i have got troubles to.

i compiled the v file into a bit file.
By adding it to a new project (with the correct cpu etc..) and then marking it as top module...

after uploading.. and running the C file in C++ delphi (didn't needed to change anything).. it doesn't show up letters....

did i do anything wrong?
tks
 
Posts: 6
Joined: Sat Oct 16, 2010 3:02 pm


Return to PCI FPGA board