PDA

View Full Version : How to implement V-USB in codevisionAVR?



Ulhas
06-04-2010, 03:35 PM
How to implement V-USB with codevisionAVR compiler ?
Also have someone tried PIC18f4450 with USB full speed data transfer rather than HID?
I searched a lot , and got many application noes bun none of them is more useful.

pratheek
06-04-2010, 07:00 PM
V-USB is open source and the code compatible with WinAVR is available for free on Object Development's website, so there should be no problem in writing the code in CodeVisionAVR.

The PIC18F4450 has full speed USB 2.0(12 Mbits/s) capability already.

vikas
06-04-2010, 07:11 PM
What are you trying to build ?

Ulhas
06-04-2010, 07:34 PM
V-USB is open source and the code compatible with WinAVR is available for free on Object Development's website, so there should be no problem in writing the code in CodeVisionAVR.

The PIC18F4450 has full speed USB 2.0(12 Mbits/s) capability already.

You are Right, The PIC18F4450 has full speed USB 2.0(12 Mbits/s) capability already. But No source code or project to demostrate that.
Many people don't know how to write a code for it, even MikroC talks about HID data transfer in which practically you get 56 to 60 kBps speed.

I want to build a data logging system even i have everything ready means code ,hardware etc i am using Max188 12bit ADC But the problem is that to transfer this info from uC to pc.
Serial data transfer is too slow hece although Max188 permits high sample rate i am unable to do it as pc is not ready to receive it.

avinash_g
06-05-2010, 07:04 AM
You are Right, The PIC18F4450 has full speed USB 2.0(12 Mbits/s) capability already. But No source code or project to demostrate that.

What you are telling man. Microchip has a very good USB STACK which fully documented and has lots of example and source code.

avinash_g
06-05-2010, 07:09 AM
get microchip usb framwork.
Its part of MAL,GET it from here
http://microchip.com/mal

MohitM
06-05-2010, 09:48 AM
You are Right, The PIC18F4450 has full speed USB 2.0(12 Mbits/s) capability already. But No source code or project to demostrate that.
Many people don't know how to write a code for it, even MikroC talks about HID data transfer in which practically you get 56 to 60 kBps speed.

I want to build a data logging system even i have everything ready means code ,hardware etc i am using Max188 12bit ADC But the problem is that to transfer this info from uC to pc.
Serial data transfer is too slow hece although Max188 permits high sample rate i am unable to do it as pc is not ready to receive it.

1. Microchip has almost everything on their site to kickstart your USB project.
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2651&param=en534491

2. You could also try the Microchip MCP2200. Since you are in Mumbai talk to Mr. Vishal G. at Silicon Components and he will arrange for a few samples of this. Its a serial-to-USB chip, with a difference. Again the PC side software is provided by Microchip and should be easy to implement if you do Windows programming.

3. A thought while using MAX188 with serial... You could read the MAX188 at whatever speeds. Inside your PIC, keep collecting (adding) this 12 bit data in two MSB-LSB registers. You can add up to 64 readings of 12-bit data before the two registers overflow. As soon as 64 readings have been added, just dump these two registers to the PC using serial. This way, you could send 64 ADC readings in just 2 bytes of serial data. Presumably you will be doing some filtering on the ADC data. So at the PC end you do a divide by 64 to get the average ADC. If you expand on this scheme, you could use 3 registers for single shot dumps of 16384 ADC readings.

You also need to consider another thing. At the PC side, even if you manage to obtain large amounts of data at fast speeds... processing, analysing, deciding on it and sending commands back to uC, will take a long time because of Windows. So you may also reconsider if it makes sense to have such high sampling rate. Of course, its your project and you know better; but this is just my thought! :-)

Hope this helps!
Mohit.