SEARCH
TOOLBOX
LANGUAGES
Register    Login    Forum    Search    FAQ

Board index » Electronics Projects » PIC18F USB development




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Maximum USB Throughput
 Post Posted: Mon Mar 12, 2012 5:36 pm 
Offline

Joined: Thu Apr 01, 2010 6:23 am
Posts: 893
You enable the timer, perform a number of communication tasks (like 100 or so) and then disable the timer. Take the timer value and divide by 100 and you have the average communication time.


Top 
 Profile  
 
 Post subject: Re: Maximum USB Throughput
 Post Posted: Mon Mar 12, 2012 9:47 pm 
Offline

Joined: Thu Sep 29, 2011 4:18 pm
Posts: 51
Ok.. But how to "Take the timer value" ?


Top 
 Profile  
 
 Post subject: Re: Maximum USB Throughput
 Post Posted: Mon Mar 12, 2012 11:08 pm 
Offline

Joined: Thu Apr 01, 2010 6:23 am
Posts: 893
You read the value of the timer. The microsoft help pages on the function will show you how.


Top 
 Profile  
 
 Post subject: Re: Maximum USB Throughput
 Post Posted: Mon Mar 12, 2012 11:38 pm 
Offline

Joined: Thu Sep 29, 2011 4:18 pm
Posts: 51
Sorry.. I still din't get what u are saying :(
I apologize for my foolish ~ Can u please say in more detail steps ?


Top 
 Profile  
 
 Post subject: Re: Maximum USB Throughput
 Post Posted: Tue Mar 13, 2012 6:52 am 
Offline

Joined: Thu Apr 01, 2010 6:23 am
Posts: 893
For general C# help you should simply google the subject, there are plenty of dedicated C# tutorial sites on the web:

http://www.c-sharpcorner.com/UploadFile ... Sharp.aspx

/Simon


Top 
 Profile  
 
 Post subject: Re: Maximum USB Throughput
 Post Posted: Tue Mar 13, 2012 11:37 pm 
Offline

Joined: Thu Sep 22, 2011 2:35 am
Posts: 78
Location: Carlisle England
You could pulse a pin on the PIC each time something is recieved from the PC.
Then scope it to see how long it takes.


Top 
 Profile  
 
 Post subject: Re: Maximum USB Throughput
 Post Posted: Fri May 18, 2012 7:25 am 
Offline

Joined: Fri May 18, 2012 7:04 am
Posts: 1
Simon Inns wrote:
Sounds reasonable given the speed of the PIC18F. If you want to go faster you can use USB protocols like the mass storage and use the PIC18F's USB DMA transfer feature to throw the data to and from external RAM very quickly


Hi all, this is my first post here, thanks for the hospitality.

On the subject, I am also starting a project with C18 (after many others) that requires a sustained throughput of 200 Kb/s.
I believe that the PIC18 can do it on its side,receiving 64B packages data in interrupt and storig it with DMA on a MC SPI RAM.
My concern is the windows side, since the whole thing is "polled" and I guess the latency is unknown.
Is it very difficult to expose a Mass Storage or a serial interface from the PIC USB library in order to use such ones on the windows side?
The alternatice is to use dedicated chips like the FTDI232, but that adds complication and costs. Some ideas?


Top 
 Profile  
 
 Post subject: Re: Maximum USB Throughput
 Post Posted: Fri May 18, 2012 6:40 pm 
Offline

Joined: Thu Apr 01, 2010 6:23 am
Posts: 893
Whichever way you decide to do it you are going to have the same issue that Windows is not a real-time OS and you can't guarantee the throughput. The answer is always buffering; usually with an interrupt on the PIC handling the real-time data collection and then the USB polling happening as and when the packets go in and out.

SD cards are ok depending on the speed you require. If the data sizes aren't too huge I would recommend you also look at chips like the 23K256 from Microchip. It's a 256K RAM chip with a high speed SPI and is small, cheap and easily daisy-chained.

Exposing a Mass Storage interface via USB is quite easy to do (and Microchip even supply a range of examples in the application libraries) however this means you need FAT support which is very resource hungry on small processors like the 18Fs. Using USB Generic HID to throw packets back and forth is far more efficient (but, of course, requires host-side programming) and provided you have the buffer-space it is quite effective.

/Simon


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

Board index » Electronics Projects » PIC18F USB development


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Translated by Maël Soucaze © 2009 phpBB.fr