at90usb162--maximum data rate achieved!!!!!!

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I don't understand the problem...

Neither do I....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not enough !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

msd wrote:
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???
It cannot achieve the 12Mbit/second data rate - see this thread. The maximum size of the data buffer is 64 bytes which means a maximum of 64x8x1000 = 256Kbits/second - well short of the claimed 12MBits. I cannot yet tell you if I have achieved 256Kbits/second as the code is still being written.

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 :(

--Mike

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, that's done internally in the microcontroller.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

the data rate is same or more in bulk transfer method compared to interrupt transfer...