AVR-USB Device Not Recognized on Atmega8
-
- Rank 1
- Posts: 23
- Joined: Sat Mar 15, 2008 7:46 pm
AVR-USB Device Not Recognized on Atmega8
I have built the PowerSwitch project to specifications with a few modifications. Whenever I connect the device I get a USB device not recognized error on more than one Windows computer. From what I have read I am most likely experiencing hardware problems, but I have been unable to find a solution. I have built the circuit exactly like the schematic except I have setup the USB port like the Easylogger project. The Atmega8 is powered by USB and is hooked up to PB0, PB1, and INT0 as in the schematic. Later today I will be able to run the circuit in debug mode and post the output. Thank you for any help.
Last edited by kwebdesigns on Mon Mar 17, 2008 3:53 pm, edited 1 time in total.
-
- Rank 1
- Posts: 23
- Joined: Sat Mar 15, 2008 7:46 pm
I am trying to debug the device, but I am having problems. I have successfully setup a RS232 port on the device through the UART pins (I tested it with another program and i could send and receive). Once I load the AVR-USB firmware with the debug level at 2 I get no output. What baud rate should I be listening at? Is there something else I did not set up correctly?
-
- Rank 1
- Posts: 23
- Joined: Sat Mar 15, 2008 7:46 pm
-
- Rank 1
- Posts: 23
- Joined: Sat Mar 15, 2008 7:46 pm
-
- Rank 1
- Posts: 23
- Joined: Sat Mar 15, 2008 7:46 pm
-
- Rank 1
- Posts: 23
- Joined: Sat Mar 15, 2008 7:46 pm
I am beginning to make some progress. I now have debugging set up and working correctly. The problem was a combination of oddebug.h not being included and DEBUG_LEVEL being defined in the wrong place. The functions uartPutc() and printHex() are now working correctly. The serial data I am now receiving is about a line of blank space then it displays "Debugging initialized", which I added in the main function after odDebugInit(). Is there some code I need to add to make powerswitch utilize debugging?
-
- Rank 1
- Posts: 23
- Joined: Sat Mar 15, 2008 7:46 pm
Sometimes I get this compiler error:
I see what you mean about DBG1 and DBG2. What order should I be including the files in main?
Code: Select all
main.c:(.text+0x1bc): multiple definition of `odDebug'
usbdrv/oddebug.o:oddebug.c:(.text+0x2c): first defined here
I see what you mean about DBG1 and DBG2. What order should I be including the files in main?
-
- Rank 1
- Posts: 23
- Joined: Sat Mar 15, 2008 7:46 pm
I am no longer getting compiler errors, but now I am back to getting no serial output. I can still run DBG1() and DBG2() fine. If I did not have the USB port connected to the AVR properly would I still see serial output?
EDIT: Whenever I unplug and plug the USB port in I get this:
EDIT: Whenever I unplug and plug the USB port in I get this:
Code: Select all
Àff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
ff:
Last edited by kwebdesigns on Tue Mar 18, 2008 7:55 pm, edited 1 time in total.