LUFA Virtual Serial Demo

486 views
Skip to first unread message

Mark

unread,
Oct 5, 2010, 1:10:05 PM10/5/10
to LUFA (Formerly MyUSB) Support
Hay all. I'm just starting out with LUFA and AVR. I will try to ask
good, descriptive questions. I would appreciate any help if
possible. Thanks Dean for all the hard work. First a little
information.

Current Goal: To use the LUFA Virtual Serial Demo to utilize the USB
CDC stack. For now, would like to have MCU send a string using
CDC_Device_SendString to HyperTerminal.

Programmer: Atmel FLIP software

Bootloader: Factory DFU installed bootloader

Hardware: MCU- ATmega32U4
Board- custom board (the USB interface was designed
correctly)

Virtual Serial Demo Changes Made:
-MCU to "atmega32u4"
-BOARD to "NONE"
-F_CLOCK to "16000000"
-Within virtualserial.c, changed code so it doesn't check for the
joystick state. Instead it just makes ReportString = "Hello World\r
\n";

Progress Thus Far: The code compiles with zero errors. Using FLIP I
can load the hex file onto the MCU. Within Device Manager it
enumerates.

The Problem: It enumerates under a new category that it calls "ATMEL
USB Devices". I need it to be seen as a virtual COM port so I can
access it through hyperterminal, labview, or any other serial equipped
program that can receive the data. I have tried installing the
included demo .inf file but nothing has changed.

Any suggestions of where I should be looking would be greatly
appreciated.

peterk

unread,
Oct 5, 2010, 6:02:01 PM10/5/10
to LUFA (Formerly MyUSB) Support
Are you sure that you are running your code? My guess is that you are
still in the DFU. If you can connect with Flip without pressing the
HWB then you aren't running your own code.

Your changes to the Makefile should be all that is needed. And
sometimes the fuses are set so that your crystal is divided by 8 so
F_CLOCK may be 2000000. But I don't think that this would stop a
simple demo from working.
When the CDC device installs then give it "LUFA VirtualSerial.inf".
You should be able to find out which COM port it has chosen by looking
in somewhere like Control Panel->System->Hardware->Device Manager-
>Ports

Peter

Mark

unread,
Oct 5, 2010, 11:19:29 PM10/5/10
to LUFA (Formerly MyUSB) Support
Yes I am running the code. It shows up in device manager, just not as
a COM port. I need to press the HWB to connect to Flip. Thanks for
the F_CLOCK tip, I'll try it out though I do not think it is the
issue. I installed the INF file by right clicking and selecting
Install which seemed to work. Then for fun I went to manually install
the inf file using the hardware wizard. The error I got was "The
specified location does not contain information about your hardware".
I think the inf file is not installing correctly and hence is not
mapping my device top a COM port. I'm not really sure how to fix this
error.

Thanks

Bob Paddock

unread,
Oct 6, 2010, 8:08:47 AM10/6/10
to myusb-sup...@googlegroups.com
> I installed the INF file by right clicking

I've tried that, and never got it to work.
Plug your device in and let the New Hardware Wizard pop up and go from there.

You can drag (make short cuts) the *.msc files found in
C:\Windows\system32 to your desktop. devmgmt.msc will show you your
current hardware. Saves all that mucking about
with the Start Menu, to see your COM Ports.

Also checkout http://www.nirsoft.net/utils/usb_devices_view.html that
I've found to be very useful when working with USB.

Opendous

unread,
Oct 5, 2010, 5:44:49 PM10/5/10
to LUFA (Formerly MyUSB) Support
Either it is still enumerating as the DFU firmware or you have
accidentally installed the wrong drivers. What is the exact name of
the enumerated device in Device Manager?

I have some help Wikis which might be useful. If you come across any
errors please tell me so that I may fix them.

For help with uninstalling Windows Drivers:
http://code.google.com/p/micropendous/wiki/UninstallingDriversInWindows

For help with loading firmware:
http://code.google.com/p/micropendous/wiki/ProgramAndTestWindows#Loading_Firmware

For help with USB Virtual Serial Communication under Windows:
http://code.google.com/p/micropendous/wiki/SerialPortUsageWindows

LUFA's Virtual Serial modified for loopback:
http://code.google.com/p/micropendous/wiki/USBVirtualSerial
Reply all
Reply to author
Forward
0 new messages