USB CDC.

General discussion on mikroPascal.
Author
Message
fabim
Posts: 197
Joined: 18 Jan 2007 15:49

USB CDC.

#1 Post by fabim » 20 Aug 2008 16:19

I and other friends of the forum, we are more than 1 years hoping to mikroe, launching the liby
"USB CDC" to mikropascal.
I wonder whether the mikroE has no intention to develop this liby /?

BaCaRdi
Posts: 236
Joined: 21 Feb 2008 02:19

Re: USB CDC.

#2 Post by BaCaRdi » 05 Sep 2008 01:49

Are you speaking of a Communication Device Class library?

That would be nice to have come to think of it..

-Marc
fabim wrote:I and other friends of the forum, we are more than 1 years hoping to mikroe, launching the liby
"USB CDC" to mikropascal.
I wonder whether the mikroE has no intention to develop this liby /?
[size=109][color=Red][b]Error[/b]: {Panic!} when trying to load: [reality shell]. kernel: "universe has been halted"...[/color][/size]
[url=http://www.bacardiware.com]Information Underground[/url]

fabim
Posts: 197
Joined: 18 Jan 2007 15:49

#3 Post by fabim » 05 Sep 2008 12:07

Exactly.
unsuccessfully tried to carry the codes in "C" for Paschal but without any success

Fabim, Brasil

BaCaRdi
Posts: 236
Joined: 21 Feb 2008 02:19

#4 Post by BaCaRdi » 05 Sep 2008 19:05

Really, so there is a USB CDC library in MikroC, but not in pascal. I didn't know this, very interesting. I am guessing this was a ME original lib as well, not a user comunity release.

-Marc
fabim wrote:Exactly.
unsuccessfully tried to carry the codes in "C" for Paschal but without any success

Fabim, Brasil
[size=109][color=Red][b]Error[/b]: {Panic!} when trying to load: [reality shell]. kernel: "universe has been halted"...[/color][/size]
[url=http://www.bacardiware.com]Information Underground[/url]

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#5 Post by zristic » 08 Sep 2008 15:25

There is no official CDC library for any mE compiler.

The reason for this is that writing a CDC library for PIC heavily depends on PC driver, i.e. windows driver. We, therefore, do not provide any of the two, because it is very difficult to write a universal one, as it is possible with HID.

However, the Internet is rich with explanations of how to make a CDC driver, all you have to do is to follow tutorials and implement them in your specific project.

fabim
Posts: 197
Joined: 18 Jan 2007 15:49

#6 Post by fabim » 11 Sep 2008 16:58

Unfortunately ....
I am more than a year trying, without any success.

Fabim, Brasil

fabim
Posts: 197
Joined: 18 Jan 2007 15:49

#7 Post by fabim » 16 Sep 2008 14:25

That exclusion, any possibility of providing this library? "CDC"

BaCaRdi
Posts: 236
Joined: 21 Feb 2008 02:19

#8 Post by BaCaRdi » 17 Sep 2008 22:12

Ahh I see where you coming from, a method to the otherwise madness. :)

Man I miss good old USART!

-Marc
zristic wrote:There is no official CDC library for any mE compiler.

The reason for this is that writing a CDC library for PIC heavily depends on PC driver, i.e. windows driver. We, therefore, do not provide any of the two, because it is very difficult to write a universal one, as it is possible with HID.

However, the Internet is rich with explanations of how to make a CDC driver, all you have to do is to follow tutorials and implement them in your specific project.
[size=109][color=Red][b]Error[/b]: {Panic!} when trying to load: [reality shell]. kernel: "universe has been halted"...[/color][/size]
[url=http://www.bacardiware.com]Information Underground[/url]

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#9 Post by Dany » 13 Oct 2008 20:54

Hi all, I made an attempt to make a simple USB_CDC_Library.
See section "Units" on the website http://users.edpnet.be/rosseel01/DRO/PIC/index.htm.

Have fun!
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Tomy
Posts: 47
Joined: 25 Jun 2007 16:50

#10 Post by Tomy » 14 Oct 2008 04:52

Thank You very much ! We wait for it very very long time :D

XorXaX
Posts: 181
Joined: 14 Nov 2006 17:09
Location: Ludvika, Sweden
Contact:

#11 Post by XorXaX » 14 Oct 2008 07:20

Dany wrote:Hi all, I made an attempt to make a simple USB_CDC_Library.
See section "Units" on the website http://users.edpnet.be/rosseel01/DRO/PIC/index.htm.

Have fun!
Interesting Dany, does it work? If it does, I might attempt to translate it into mikroC.
Jonas Andersson, Sweden
EasyPIC3, EasyPIC5, various dev boards and fully licensed mikroC
"It's nice to be important, but it's more important to be nice"

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#12 Post by Dany » 14 Oct 2008 08:22

XorXaX wrote:Interesting Dany, does it work? If it does, I might attempt to translate it into mikroC.
Hi XorXaX,
Well yes, it works, but not with the PC communication programs i liked it to work like "HyperTerminal" or the Uart tool in the mikroElektronica's compiler's IDE. I do not know the reason for this.
Also I had to use a driver that is different from the one Microchip itself advises ("usbser.sys").
But, I am happy that I got something working. :D

Anyway, the code is "minimal" and more oversee-able than the Microchip C18 USB firmware (but also undoutably more error prone I think), so it should be possible to translate it in MicroC I think. :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

XorXaX
Posts: 181
Joined: 14 Nov 2006 17:09
Location: Ludvika, Sweden
Contact:

#13 Post by XorXaX » 14 Oct 2008 08:24

Thanks for the info, I will have a look at it when I get the time.
Jonas Andersson, Sweden
EasyPIC3, EasyPIC5, various dev boards and fully licensed mikroC
"It's nice to be important, but it's more important to be nice"

vesko_hard
Posts: 10
Joined: 01 Feb 2008 10:54

#14 Post by vesko_hard » 14 Oct 2008 08:46

Hi,

Thanks for CDC Libraly.

I compile demo project and edit VID and PID in driver ini-file.
Windows detect device and accept driver, but in device manager i see: "This device cannot start. (Code 10)".

Image


USB_CDC_ProjectItems.ppas:

Code: Select all

UsbManufacturer : string[20] = 'Vesko_hard';
// Sets the name of the manufacturer of the USB device you are creating.

UsbProduct      : string[20] = 'CDC Dongle';
// Sets the name of the USB product you are creating.

UsbSerialNo     : string[20] = '1234';
// Sets the serial number of the product you are creating.

// -- ID numbers --
VENDOR_ID     : word = $1234;
// Identifies the vendor or manufacturer of the USB device created.
// This number is (normally) defined by the USB organisation.

PRODUCT_ID    : word = $1234;
// Identifies the product, defined by the manufacturer (You).

DEVICE_REL_NR : word = $0101;
// Identifies the device release number (in BCD!), defined by the manufacturer (You).

usbcom.inf:

Code: Select all

[usbcom_Mfg]
; DisplayName               Section           DeviceId
%usbcom_DeviceDesc%=usbcom_DDI, USB\VID_1234&PID_1234

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#15 Post by Dany » 14 Oct 2008 09:05

vesko_hard wrote:I compile demo project and edit VID and PID in driver ini-file. Windows detect device and accept driver, but in device manager i see: "This device cannot start. (Code 10)".
Hi, your code changes seem to be Ok. I see that you already at serial port number 30. Is this indeed the case that there were already 29 com ports present? If not, there is something wrong with the windows comport enumeration process. I do not know if this is the cause of the problem you face however, it is possible. Did you try "troubleshoot"?
Anyway, the PC software "TestCDC.exe" is only capable of selecting comports upto number 5. :cry:
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Post Reply

Return to “mikroPascal General”