AVR-CDC Problems

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
jimmieclark3

AVR-CDC Problems

Post by jimmieclark3 » Wed Aug 08, 2007 1:50 pm

I am having some strange problems with this project. I compiled it for the ATmega88, only because I wanted to add a "chip is working" led. I hook it up and install the driver. It appears to work fine, I try to send and receive with it and I get no data. Nothing at all. I tried the precompiled .hex files for both polling and interrupt. Nothing.

so, I pull out an oscilloscope. I look at it, there is data flowing.

I am not sure what is wrong, I cannot get the avr-cdc to communicate back to the PC from another device and I cannot get it to communicate to another device.

I would like to get this working, but maybe this project is not a good solution. I read somewhere in another topic that it has problems.

Thanks for your help.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Wed Aug 08, 2007 4:14 pm

Are you sure that you used a binary for the Mega88? Please note that the Mega8 and Mega88 are not binary compatible. You need a hex file specifically compiled for the Mega88.

The problem with AVR-CDC is that it is not completely USB standards conformant. It works with (at least) Windows and Mac OS X.

jimmieclark3

Yep

Post by jimmieclark3 » Wed Aug 08, 2007 4:22 pm

I did use the ATMega88 hex file. I have tested it multiple times. Right now I am trying the AVR-IO. It doesn't seem to work either.

jimmieclark3

Forgot to mention

Post by jimmieclark3 » Wed Aug 08, 2007 4:24 pm

The driver installs properly and the device is configurable. The PC acts like it is working properly, which tells me the USB is working on the chip. It just is not communicating through the UART on the chip.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Wed Aug 08, 2007 4:41 pm

I suspect that the bulk endpoints for data I/O have stalled. This it one of the potential problems if the interrupts are disabled for too long (which they sometimes are in AVR-CDC). Whether the problem occurs, depends on your operating system, host hardware and other more or less random factors.

jimmieclark3

So

Post by jimmieclark3 » Wed Aug 08, 2007 4:55 pm

Now this uses the AVR-USB right??

Or does it not?

So are there more stable projects that can be used to talk with a microcontroller then?

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Wed Aug 08, 2007 5:10 pm

Yes, it uses AVR-USB, but it can't meet the requirements entirely for various reasons. If you want a reliable CDC device, it's best to use a microcontroller with full speed USB hardware built-in.

jimmieclark3

Hmmm

Post by jimmieclark3 » Wed Aug 08, 2007 5:23 pm

It seems interesting that many people are having success with the AVR-USB and I am not. I would like to use this project, I hope it is just something I am doing wrong. Maybe a fuse bit or something? Or a circuit problem that I am not seeing.

Thanks for your help

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Wed Aug 08, 2007 5:31 pm

If the device enumerates and is recognized by your operating system, then AVR-USB is functional. If the pipes stall or serial I/O does not work, that's a problem of the firmware application using AVR-USB, not of the driver itself.

I know that the AVR-CDC application takes the driver to its limits and sometimes slightly beyond.

So: If the device enumerates and is recognized by the OS, it can't be a fuse, circuit or hardware problem.

Post Reply