Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 27, 2024, 04:47:24 04:47


Login with username, password and session length


Pages: [1]
Print
Author Topic: MikroC + USB + some more stuff  (Read 10298 times)
0 Members and 2 Guests are viewing this topic.
Bobbla
Newbie
*
Offline Offline

Posts: 22

Thank You
-Given: 2
-Receive: 16


« on: April 28, 2013, 08:39:58 20:39 »

Hallo again, I'm working on a small project in where I am building a small device(for sampling ADC) and a windows application(for viewing samples and stuff). But at the moment I'm looking for help.

The device is a small PIC18F24J50, a MCP1802 (3.3V) LDO and some other components(crystal,resistor,capacitor). Hopefully it will be powered by the USB when its done.

Problem: At the moment I'm having problems making the USB work in proteus. (I'm using mikroC PRO for Pic 6.0.0 and proteus 7.10 (but think its with some 7.11 stuff attached..))

The simulation log shows some messages, among other these:
Code:
[PIC18 USB] PC=0x167A. SETUP when BD is not owned by SIR
[PIC18 USB] PC=0x167A. SETUP when BD is not owned by SIR
[PIC18 USB] PC=0x167A. SETUP when BD is not owned by SIR
USB device initialization failed.

The simulation also crashes sometimes...... not sure what that is about.

I've looked for a solution, but found none.
So I'll attach some code and schematics now.
And hope that a solution will be found.

Hope thats enough info..  Thanks
Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4671

Thank You
-Given: 836
-Receive: 4330


There is no evidence that I muted SoNsIvRi


« Reply #1 on: April 28, 2013, 09:27:19 21:27 »

for error "USB device initialization failed.
did you install virtual usb driver?
« Last Edit: April 28, 2013, 09:34:10 21:34 by pickit2 » Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
Bobbla
Newbie
*
Offline Offline

Posts: 22

Thank You
-Given: 2
-Receive: 16


« Reply #2 on: April 28, 2013, 10:32:15 22:32 »

for error "USB device initialization failed.
did you install virtual usb driver?

As far as I can tell I've installed it... :/  I tested some of the proteus samples and they worked. Is there any way to check for sure?
(Also, attached an image of my somewhat different USB analyzer..)

btw, 3000 posts... you've been busy!
Logged
bbarney
Moderator
Hero Member
*****
Offline Offline

Posts: 2429

Thank You
-Given: 405
-Receive: 545


Uhm? where did pickit put my mute button


« Reply #3 on: April 29, 2013, 12:12:17 00:12 »

Quote
btw, 3000 posts... you've been busy!

 Shocked  1/2 of those were mutes  Grin
Logged

Ever wonder why Kamikaze pilot's wore helmet's ?
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #4 on: April 29, 2013, 10:40:22 10:40 »

Bobbla,

can you post the source that generated the object code in the problem area 167A

Ignore the message about D+ and D-.

I guess BD is buffer descriptor and maybe SIR is a typo and should be SIE - USB Serial Interface Engine

Have you successfully ran any of the Proteus USB demos?   

Rgds George

« Last Edit: April 29, 2013, 10:44:31 10:44 by towlerg » Logged

Win 7 Ult x64 SP1 on HP2570p
Bobbla
Newbie
*
Offline Offline

Posts: 22

Thank You
-Given: 2
-Receive: 16


« Reply #5 on: April 29, 2013, 10:29:05 22:29 »

can you post the source that generated the object code in the problem area 167A

I guess BD is buffer descriptor and maybe SIR is a typo and should be SIE - USB Serial Interface Engine

Have you successfully ran any of the Proteus USB demos?   

Code and schematics is inside the Derp.zip file which you can find in the first post.

sure about "typo".. I use a function that comes with mikroC..

I've successfully ran both the MSD and HID samples/demos that are found in PICDEM FS USB folder.


btw pickit2, I'm under the impression that you got this working no problem... so what did you do??? Did you extract the schematics, run the simulation and use the hex as was, or did you recompile? what?

also, I'm using windows server 2008 R2 standard which is a 64 bit OS... I know there used to be a problem with 64 bit OS's and the virtual USB, but I think that was solved and I've successfully ran some USB samples as stated previously....  Huh
Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4671

Thank You
-Given: 836
-Receive: 4330


There is no evidence that I muted SoNsIvRi


« Reply #6 on: April 29, 2013, 10:56:57 22:56 »

Have you tried a later version of proteus usb 64bit drivers from labcenter,

No I just ran your files without usb drivers installed, even with drivers it failed getting descriptor. (Only have a party patched proteus 8, I don't have a fully working proteus here)
USB device initialization failed, it looks like it don't get a valid value.
Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #7 on: April 30, 2013, 01:21:41 01:21 »

Quote
Code and schematics is inside the Derp.zip file which you can find in the first post.

Sorry, didn't see that.

Quote
sure about "typo".. I use a function that comes with mikroC..

If it is a typo, then it's in Proteus. Just a guess mind.

I ran your HEX on Win 7 x86 and Proteus 7.10 and it ran.

A USB Input Device was created in the HID section.

Rgds  George
« Last Edit: April 30, 2013, 01:24:26 01:24 by towlerg » Logged

Win 7 Ult x64 SP1 on HP2570p
Bobbla
Newbie
*
Offline Offline

Posts: 22

Thank You
-Given: 2
-Receive: 16


« Reply #8 on: April 30, 2013, 03:02:11 15:02 »

If it is a typo, then it's in Proteus. Just a guess mind.

I ran your HEX on Win 7 x86 and Proteus 7.10 and it ran.

A USB Input Device was created in the HID section.

SO I guess we can conclude that the code is working then... leaving proteus as the most likely fault. Could you tell me where you got your Proteus from? I've got 7.10SP0 (Build 12325) with advanced simulation according to the About window. Wonder if there is something wrong with the medicine... or me.

Edit: not sure what a "party" version is.. but everyone here seems to have made it further then me. And yes I've tried to install the newest/one virtual usb install file I found on labcenters webpage.. not much happened.
« Last Edit: April 30, 2013, 03:06:45 15:06 by Bobbla » Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #9 on: May 01, 2013, 01:00:56 01:00 »

Quote
SO I guess we can conclude that the code is working then...
Wow, I wouldn't go that far.

Quote
Could you tell me where you got your Proteus from?
The sticky in the "Proteus 7.9sp1 - 7.1x (Work in Progress) Nemo patch" thread. Plus pickit2's reply #104 and LithiumOverdosE's reply #133, all from the same thread. Note that I am running Win 7 x86 ult not virtualised.

Quote
not sure what a "party" version is..
I don't know either, maybe partly?

Rgds George

Logged

Win 7 Ult x64 SP1 on HP2570p
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC