Quantcast
Channel: Objective Development Forums
Viewing all articles
Browse latest Browse all 4524

Re: v-usb vs rs232 transfer rate

$
0
0
This project should become an example on and for tinyUSBboard ("http://matrixstorm.com/avr/tinyusbboard/").

Because this board provides 16 MHz the "oscilloscope" samples in "running mode" with maximum rate (100ksps?) and 8bit resolution.
ADC is implemented as interrupt, but always stores the current ADC uninterruptable, while multibuffer stuff is interruptable to not block V-USB.
Some of the samples inbetween one buffer period are dropped, but this should keep jitter to a minimal level.

The number of buffers and their size can be configured within the source code of the firmware. The host application always supports any parameter, since it is handshaked during enumeration.
At the moment I use 16 buffers 56bytes each (there the 9.3kBps came from), since this provides good latency with very very rare buffer underruns. For communication with host there is a special protocol for first checking,
if a new buffer is available...

If latency is no problem, it would be possible to reduce the number of buffers down to two and therefore increase their size to 450 bytes each. Because of less overhead you then could transmit about 10 ksps.

Based on 9kSps and sampling theorem the maximum frequency displayable should be 4,5kHz.
But lets say about 3kHz to 4kHz? since we also have a little bit of jitter within each sample.
But anyway it is just a demonstration example, if you want an oscillocope - use your soundcard ;-)

Best regards

Viewing all articles
Browse latest Browse all 4524

Trending Articles