| View previous topic :: View next topic |
| Author |
Message |
Hank
Joined: 13 Mar 2005 Posts: 3
|
Posted: Sun Mar 13, 2005 5:49 pm Post subject: Dragon USB LCD Text sample |
|
|
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 |
|
| Back to top |
|
 |
fpga4fun Site Admin
Joined: 18 Sep 2003 Posts: 828
|
Posted: Mon Mar 14, 2005 6:18 am Post subject: |
|
|
1. What version of MSVC are you using?
2. Can you give us more details by "the program fails"? Does the assert fails? |
|
| Back to top |
|
 |
Hank
Joined: 13 Mar 2005 Posts: 3
|
Posted: Mon Mar 14, 2005 6:22 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Hank
Joined: 13 Mar 2005 Posts: 3
|
Posted: Tue Mar 15, 2005 3:36 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
fpga4fun Site Admin
Joined: 18 Sep 2003 Posts: 828
|
Posted: Tue Mar 15, 2005 5:07 am Post subject: |
|
|
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) |
|
| Back to top |
|
 |
inan
Joined: 26 Sep 2009 Posts: 1
|
Posted: Sat Sep 26, 2009 2:26 pm Post subject: Unfamiliar with Visual Studio.NET 2003 |
|
|
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.  |
|
| Back to top |
|
 |
chokol
Joined: 01 Jul 2010 Posts: 1 Location: Singapore
|
Posted: Thu Jul 01, 2010 10:17 am Post subject: |
|
|
I remember reading an article about his problem somewhere. Maybe I will check again and tell you later  _________________ Dedicated Java Developers |
|
| Back to top |
|
 |
|