|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/08/22 12:39
|
By: Marco
|
Status: Visitor
|
|
|
|
|
|
|
No news...I'm running out of ideas.
The PIC programming goes right, only that warning I mentioned above missing that file. The configuration bits are right and the connections seems right too. When I plugin the USB connector who contacts who?The PC ask the pic "who your are" or when PIC is plugged and powered, is the one who identifies himself? This is because no one of the lines D+/D- changes value, like the pic was death...
Thanks.
|
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/08/22 15:29
|
By: Marco
|
Status: Visitor
|
|
|
|
|
|
|
Two questions about the schematic in TQFP: Pin 29(Vss) is also connected to gnd as pin 6 right? And the Vusb(pin 37) isn't connected elsewhere but the cap to gnd?Should this be connected to Vdd?
Thanks
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/08/22 15:33
|
By: Mat
|
Status: Admin
|
|
|
Karma: 7  
|
|
| Posts: 211 |  | |
|
Thats correct, have to say im running out of ideas too.
For the communication, the pic initially signals to the PC its presense by the use of pull up resistors (internal) , then the PC talks to the PIC. Sounds like your H/W isnt an issue, probably best to recheck all the config settings. These are usually the problem!
Mat
|
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/08/22 15:43
|
By: Marco
|
Status: Visitor
|
|
|
|
|
|
|
Sorry Mat, you mean "That's correct" that pin 29 is also connected to gnd? And the Vusb (37) it's connected to Vdd?
Sorry but I couldn't undestand to what you were reply.
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/08/22 15:45
|
By: Mat
|
Status: Admin
|
|
|
Karma: 7  
|
|
| Posts: 211 |  | |
|
|
Vusb, should just be connected to the capacitor (which in turn is connected to ground), NO Vdd there. It is a capacitor for the internal charge pump, needed for the USB transciever.
|
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/08/22 16:07
|
By: Marco
|
Status: Visitor
|
|
|
|
|
|
|
Ok. So hardware seems no to be the problem.
In the code why can't I find the "USBcheckBusStatus()"? There is no method.Just the call in the main.c file.
Well, for today is enough...One more question, have you tested the code after the change of the pointer conversion suggested by neiwiert? (page 2)
Tomorrow will try the code exacly as it is in the zip...
Best regards
|
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/08/23 03:03
|
By: majestrix
|
Status: User
|
|
|
Karma: 0  
|
|
| Posts: 29 |   | |
|
one quick question.. arent u using all the driver files that are in the zip file..?? as far as i know u gotta use em or write most of it on ur own... well u can find USBcheckBusStatus() in usbdrv.c. as to test what i did was compiled the full PIC program from the article and then once thats working, i wrote the user.c file... may not be the best method, but i guess it will confirm that ur harware is working...
|
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/08/23 09:52
|
By: Marco
|
Status: Visitor
|
|
|
|
|
|
|
|
Well some good news. The problem were in the configuration bits. The "USB Voltage Regulator" must be "enabled". then it asked for the drivers and I brownsed the drivers folder and it was fine. But in the device manager it is in "other devices" with a yellow "?". Any suggestion? Thanks
|
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/08/23 09:54
|
By: Marco
|
Status: Visitor
|
|
|
|
|
|
|
It is with a yellow "?" but is identified as PIC4550. The device manager looks like: -Other devices ? PIC18F4550 Family Device Is this a issue?
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/08/23 10:07
|
By: Mat
|
Status: Admin
|
|
|
Karma: 7  
|
|
| Posts: 211 |  | |
|
Sounds correct to me, been a while since i used it though 
Mat
|
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/08/23 15:38
|
By: Marco
|
Status: Visitor
|
|
|
|
|
|
|
Everything works fine... Only that in the device manager stills the yellow '?'.
Mat, can you tell me where can I find information about the .dll file. What I want to know is what is generically is done in each method.wich are input, wich are to write. Do I make me understood? This is because in the _MPUSBRead what is read in the USB buffer is written into the pData parameter right? This is what I understand from the SendReceivePacket(...). Because when it returns from that method to the method usb_int.Add(..) it brings another result that isn't wrote elsewhere.
By the way, can you help me where can I understand better the firmware in the pic?Besides the "USB Complete" book I've been read the USB in the shell from the beyondlogic site, but this is more about the protocol.I'd like more about the firmware itself.
Thanks very much for everything.
|
|
|
|