I am communicating between PC and at90usb162 with USB interface in Interrupt method...I used 8Mhz external crystal for external clock...
My interrupt polling interval is 1ms...my problem is I need to wait 1ms every cycle of program for proper data transfer...I could not avoid this 1ms wait...I don't understand the problem...
at90usb162--maximum data rate achieved!!!!!!
I don't understand the problem...
Neither do I....
Not enough !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Doesn't usb work on a 1mS tick? Could be a reason right there. Ratherthan solving the problem it sounds like you have to work around the way usb actually operates.
I am trying to find out that 1ms tick...but it is written in the datasheet of usb162 that data rate of 12Mbit per second supported, so if that 1mS is included then how that data rate is possible???
Anyone has counted the data-rate of usb162 if they have used??
I am trying to find out that 1ms tick...but it is written in the datasheet of usb162 that data rate of 12Mbit per second supported, so if that 1mS is included then how that data rate is possible???
You can go to larger USB AVRs like the ATmega16U4 which have an endpoint buffer size of 256 bytes which would give you 256*8*1000 ~ 2 Mbits/sec but that is about it.
If it is any consolation I currently have a custom circuit I was prototyping using the AT90USB162. I too was hoping to get 12Mbit/second which would be significantly better than 115200 baud that is currently being used. The next iteration of the board will definitely use a ATmega16U4. My consolation is that I have other schematic/board errors that also need fixing :(
USB works on 1ms frames - this is controlled by the host. Therefore you get to send 12000bits worth within 1ms. Your code loads up a ram based buffer for the frame you want to send then some time later via USB it gets transferred to the host. Things don't happen immediately.
Add to that the fact that each endpoint only has one send or receive opportunity in each frame. Thats why the buffer size (and its max value) directly affects the rate that can be achieved.
If anyone has used at90usb162, can you tell me do I need to connect resistor from D+ line to 3.3V or(5V self power -my case) for detecting as a full speed device...
I have read in usb-nutshell pdf..page-6
http://www.beyondlogic.org/usbnu...
I want to crosscheck above point....
No, that's done internally in the microcontroller.
- Dean :twisted:
the data rate is same or more in bulk transfer method compared to interrupt transfer...