General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
			
		
		
			- 
				
																			 petrdvor
						
						
													
							
						
									
						Post
					
								by petrdvor » Tue Dec 16, 2008 12:15 am
			
			
			
			
			Hello,
i tried to use hid-data example and if i type into commandline "hidtool.exe write 0x45" and subsequently "hidtool.exe read" i always get 0xff (128 times). System found device correctly:
Code: Select all
bus-0/\\.\libusb0-0008--0x16c0-0x05df     16C0/05DF
- Manufacturer : obdev.at
- Product      : DataStore
  wTotalLength:         34
  bNumInterfaces:       1
  bConfigurationValue:  1
  iConfiguration:       0
  bmAttributes:         80h
  MaxPower:             10
    bInterfaceNumber:   0
    bAlternateSetting:  0
    bNumEndpoints:      1
    bInterfaceClass:    3
    bInterfaceSubClass: 0
    bInterfaceProtocol: 0
    iInterface:         0
      bEndpointAddress: 81h
      bmAttributes:     03h
      wMaxPacketSize:   8
      bInterval:        100
      bRefresh:         0
      bSynchAddress:    0
Can anybody help me, how to send simply data to avr and how to get some data back? My idea is communicate via USB similarly as through UART, but i know, it's more complicated. Does anybody have very very simple project with atmega8 under windows?
I'm beginner in this things. Will anybody have nerves for me?
Thanks
Petr Dvorak
 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 christian
- Objective Development
  
- Posts: 1443
- Joined: Thu Nov 09, 2006 11:46 am
						
						
													
							
						
									
						Post
					
								by christian » Fri Dec 19, 2008 12:15 pm
			
			
			
			
			Yes, something is broken with this example. Don't know what, though. The data arrives at the AVR, as far as I remember, but it's not written to the EEPROM correctly.
Just modify the example to set some I/O pins instead. You'll see that it works.
			
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 petrdvor
						
						
													
							
						
									
						Post
					
								by petrdvor » Tue Dec 30, 2008 2:29 pm
			
			
			
			
			Thank You, it works now, but i don't know why it didn't work. I changed only frequency in makefile...
			
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 alan_cv86
- Posts: 3
- Joined: Wed Dec 31, 2008 11:41 pm
						
						
													
							
						
									
						Post
					
								by alan_cv86 » Sun Jan 11, 2009 11:10 am
			
			
			
			
			I'm a sort of newbie in this USB stuff, I get this message after typing the 
"make -f makefile.windows":
gcc  -O -Wall  -c hidtool.c -o hidtool.o
process_begin: CreateProcess(NULL, gcc -O -Wall -c hidtool.c -o hidtool.o, ...)
failed.
make (e=2): The system cannot find the file specified.
make: *** [hidtool.o] Error 2
I don't have any idea of what does this mean. 
Thank you
Alan C.
pd: I'm using windows vista
			
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 christian
- Objective Development
  
- Posts: 1443
- Joined: Thu Nov 09, 2006 11:46 am
						
						
													
							
						
									
						Post
					
								by christian » Sun Jan 11, 2009 12:04 pm
			
			
			
			
			This message means that your WinAVR installation is broken. Please check whether you can compile anything else.
			
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			 alan_cv86
- Posts: 3
- Joined: Wed Dec 31, 2008 11:41 pm
						
						
													
							
						
									
						Post
					
								by alan_cv86 » Sun Jan 11, 2009 9:20 pm
			
			
			
			
			I tried installing again winavr and mingw... is there another way to solve that broken installation, i'm getting that similar message while trying to do another "makefile.windows"
C:\avrusb-20081126\examples\custom-class\commandline>make -f makefile.windows
gcc  -I/usr/local/mingw/include -O -g -Wall -c opendevice.c
process_begin: CreateProcess(NULL, gcc -I/usr/local/mingw/include -O -g -Wall -c
 opendevice.c, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [opendevice.o] Error 2
I also checked i had my circuit done correctly and flashed the hid-mouse hex after compiling and everything. It just worked perfect, it made the circle stuff. Then I flashed back the  hid-data and also installed the hid stuff. But still no good results when i do the makefile. 
Thank you
			
			
									
									
						 
		 
				
		
		 
	 
	
				
	
				
		
		
			- 
				
																			 alan_cv86
- Posts: 3
- Joined: Wed Dec 31, 2008 11:41 pm
						
						
													
							
						
									
						Post
					
								by alan_cv86 » Mon Feb 02, 2009 9:00 am
			
			
			
			
			The problem is that when you install MINGW you also have to modify the path so that the compiler gcc can be found. To do this follow the next steps: in vista. In XP it might be similar. 
-click start
-rightclick computer
-select properties
-click advanced system settings
-select advance tab
-click enviroment variables
-And in system variables search "path". Then edit and paste something like this: "C:\MinGW\bin"