|
|
Re:PICDEM FS USB Code
|
|
Date: 2006/03/14 14:53
|
By: Mat
|
Status: Admin
|
|
|
Karma: 7  
|
|
| Posts: 211 |  | |
|
Hey, well done!
To insert pictures (and files for that matter) into the forum, you have to be a registered user and logged in. Then you will see an attach image section when posting, select the image using the browse button, and then place an [img] tag where you would like the image to appear in the post.
|
|
|
|
|
|
Re:PICDEM FS USB Code
|
|
Date: 2006/03/14 23:22
|
By: neiwiert
|
Status: User
|
|
|
Karma: 0  
|
|
| Posts: 1 |   | |
|
Hello
When compile in C18 i discovered the folwing warning usbdsc.c:238:Warning [2054] suspicious pointer conversion
typcast the lines in usbdsc.c
rom const unsigned char *rom USB_CD_Ptr[]={&cfg01,&cfg01}; rom const unsigned char *rom USB_SD_Ptr[]={&sd000,&sd001,&sd002};
to
rom const unsigned char *rom USB_CD_Ptr[]={(rom char*)&cfg01,(rom char*)&cfg01}; rom const unsigned char *rom USB_SD_Ptr[]={(rom char*)&sd000,(rom char*)&sd001,(rom char*)&sd002};
and the warning now disapears
|
|
|
|
|
Re:PICDEM FS USB Code
|
|
Date: 2006/03/14 23:35
|
By: Mat
|
Status: Admin
|
|
|
Karma: 7  
|
|
| Posts: 211 |  | |
|
Thanks, Looks like a good fix to me! Wasn't one which I was worried about, but it appears to compile fine, and also run as expected.
Thanks, Mat
|
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/04/04 08:21
|
By: Petr Tomicek
|
Status: Visitor
|
|
|
|
|
|
|
|
Thank you very much for this article. It was very helpful for me in understanding PIC firmware and PC programming. I'm just want to ask how can recognize type of transfer (control, bulk, isochronous...). thanks for answer, Petr
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/04/04 08:55
|
By: Mat
|
Status: Admin
|
|
|
Karma: 7  
|
|
| Posts: 211 |  | |
|
If you look at usbdsc.c lines 223 and 224 you should see
| Code: |
sizeof(USB_EP_DSC),DSC_EP,_EP01_OUT,_INT,USBGEN_EP_SIZE,32,
sizeof(USB_EP_DSC),DSC_EP,_EP01_IN,_INT,USBGEN_EP_SIZE,32
|
Notice the _INT, this defines that the End Points are setup in Interupt mode for transfer.
Mat
|
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/04/04 15:12
|
By: Petr Tomicek
|
Status: Visitor
|
|
|
|
|
|
|
Hi guys again,
one more question: does MC firmware use USB interrupts somehow? I can't find any vector address definition so I guess that no, so probably it use just INT flags... I need to set some interrupts in my application but don't know how it influence USB firmware.
Thanks, Petr
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/04/04 15:24
|
By: Mat
|
Status: Admin
|
|
|
Karma: 7  
|
|
| Posts: 211 |  | |
|
Hey, I havnt got the code with me to check, (in a library) however I'm almost certain the firmware doesnt use interrupts, or at least I cant remember any references to them or why it would need them. It simply polls a service routine, so you should be fine to write your own program using them, just be careful not to get caught up in your interupts and leave the usb unserviced!
Mat
|
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/04/05 12:19
|
By: jf
|
Status: Visitor
|
|
|
|
|
|
|
Hi all, great project, thanks very much. I'm just wondering whether or not it is possible to change this project to work with an 18f2455, I know the hardware should be the same. But I was wondering if anyone knows how to change the firmware, I've tried changing the .lkr and the pic in mplab but to no avail. Thanks very much john
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/04/05 12:26
|
By: Mat
|
Status: Admin
|
|
|
Karma: 7  
|
|
| Posts: 211 |  | |
|
have you changed the io_cfg file , the 18f3450 is unlikely to have the same ports as the 18f4550,particularly portd i think.
Mat
|
|
|
|
|
|
Re:Basic USB - Using Microchip Stack and C#.Net
|
|
Date: 2006/04/13 11:45
|
By: Nick
|
Status: Visitor
|
|
|
|
|
|
|
hello
i've got a question about the board itself, why do i need to put a 4k7 resistor between RA1 and VDD, because i got the bootup issues myself, but don't understand why to put a resistor on that pin.
Greetz Nick
|
|
|
|
|
|
Re:PICDEM FS USB Code
|
|
Date: 2006/04/13 12:22
|
By: dimple
|
Status: Visitor
|
|
|
|
|
|
|
All include, library etc paths are set perfactly but still I am getting the following error
"Failed to load c:picusbdemoMCHPUSB.cof"
what would be the reason?
|
|
|
|