Dangerous Prototypes

In development => Project development, ideas, and suggestions => Open source USB stack => Topic started by: Sjaak on May 07, 2012, 08:43:55 pm

Title: emulating an USB device
Post by: Sjaak on May 07, 2012, 08:43:55 pm
found this one HaD: http://www.lendlocus.com/?q=16fusb (http://www.lendlocus.com/?q=16fusb)

I don't have a pic16f628 so i don't know if it is working,
Title: Re: emulating an USB device
Post by: dolabra on May 08, 2012, 12:45:14 am
that's pretty cool,  hard to do in a pic!  But, I think I'll wait for the 16f145x to get my 16f usb fix.  I hope they come out soon!!!!
Title: Re: emulating an USB device
Post by: tayken on May 08, 2012, 03:11:17 am
I saw that too. I guess that works but it'll be slow. I bookmarked it to try out in the future. Shall I send you some 628s (DIP)?
Title: Sv: emulating an USB device
Post by: honken on May 08, 2012, 07:08:54 am
I read the article. Truly awesome work, but not without some caviats. Only ep0 and vendor class spec, so you always need a driver.
Perhaps it can be pressed into doing hid but I'm doubtful.
Title: Re: Sv: emulating an USB device
Post by: Sjaak on May 08, 2012, 08:45:04 am
[quote author="honken"]I read the article. Truly awesome work, but not without some caviats. Only ep0 and vendor class spec, so you always need a driver.
Perhaps it can be pressed into doing his but I'm doubtful.[/quote]

Isn't V-usb also started as a small stack without much functionality?

[quote author="tayken"]I saw that too. I guess that works but it'll be slow. I bookmarked it to try out in the future. Shall I send you some 628s (DIP)?[/quote]

No thanks. Already got too much projects ;)
Title: Re: emulating an USB device
Post by: dolabra on May 08, 2012, 11:07:17 pm
I keep thinking about this......

I wonder if it could be ported to the 12f1840 --- it has an internal osc at 32Mhz (8mips) and $1 a part that could be pretty interesting way to get a cheap USB interface.
Title: Re: emulating an USB device
Post by: arhi on May 09, 2012, 01:30:05 am
[quote author="dolabra"]I keep thinking about this......

I wonder if it could be ported to the 12f1840 --- it has an internal osc at 32Mhz (8mips) and $1 a part that could be pretty interesting way to get a cheap USB interface.[/quote]

would be interesting project if you have time for it .. mine time is so scarce that ft232 is super cheap
Title: Re: emulating an USB device
Post by: dolabra on May 09, 2012, 02:06:00 am
Quote
would be interesting project if you have time for it .. mine time is so scarce that ft232 is super cheap

Thinking about new projects is much more fun than finishing old one :)

I need to study this project more... I was always under the impressions (based on the v-usb project) that you needed 12mips to implement USB, but this project would seem to prove that assumption wrong.
Title: Re: emulating an USB device
Post by: arhi on May 09, 2012, 02:14:57 am
it depends on the type of usb, they are not implementing CDC or HID but some custom protocol so you need drivers .. probably just because of not enough cpu power
Title: Re: emulating an USB device
Post by: torwag on May 10, 2012, 04:02:16 am
Nice...

if someone found time I would be happy to read about the experience.
How easy was it to set-up?
How much ressources (computational, memory) left for the real task?
How stable is it?

Well many projects need some sort of PC interface only for a very limited amount of time (e.g. to set-up or change some parameters). You could save the FTDI or external USB-UART cable by this.
E.g. add the code to the PIC to easily access the EEPROM via USB and you can whenever needed reconfigure your program by writing new data to a config area in the EEPROM without the need of a programmer. Design your PCB to become a cheap USB plug and you might have the cheapest and fastest way to reconfigure your project.

Create a small application for the PC and you are done.

Most interesting would be how much resources are occupied and if there is enough left for the real task.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01282084208session_write_close ( )...(null):0
20.01312215800ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01312216576Database_MySQL->query( ).../DatabaseHandler.php:119
40.05402355312Database_MySQL->error( ).../Db-mysql.class.php:273