Page 1 of 1
AVR-CDC Problems
Posted: Wed Aug 08, 2007 1:50 pm
by jimmieclark3
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.
Posted: Wed Aug 08, 2007 4:14 pm
by christian
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.
Yep
Posted: Wed Aug 08, 2007 4:22 pm
by jimmieclark3
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.
Forgot to mention
Posted: Wed Aug 08, 2007 4:24 pm
by jimmieclark3
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.
Posted: Wed Aug 08, 2007 4:41 pm
by christian
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.
So
Posted: Wed Aug 08, 2007 4:55 pm
by jimmieclark3
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?
Posted: Wed Aug 08, 2007 5:10 pm
by christian
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.
Hmmm
Posted: Wed Aug 08, 2007 5:23 pm
by jimmieclark3
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
Posted: Wed Aug 08, 2007 5:31 pm
by christian
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.