CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC18F4550 USB PC Host Read Requests not working properly

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
j_girl
Guest







PIC18F4550 USB PC Host Read Requests not working properly
PostPosted: Wed Apr 26, 2006 4:20 pm     Reply with quote

Hi,

I work for a small company that is designing a USB Bulk Device to communicate with a custom PC program built with National Instruments Labview 7.1. I am using a PIC18F4550 as the USB controller. Our company bought the USB kit from CCS and have included the header files given with the product for the Bulk Demo program (pic_usb.h,usb_demo_scope,usb.c). Including those files in my code, I used the user functions (usb_get_packet and usb_put_packet, etc..) to communicate with Labview. Everything works well, the device enumerated, and the two can successfully communicate. We do however have a problem when the Labview program attempts to read more than once when there is no data to send.

This is what happens:
1. PC requests data
2. PIC sends data
3. PC requests data (Now the PIC has not written any new data)
4. PC displays timeout error
5. PC requests data
6. PC receives data from step 2 above
7. PC requests data (PIC still hasn't written)
8. PC displays timeout error
9. PC requests data
10. PC receives data from step 2
11. Continues alternating

I think this may be a data0/data1 toggle issue, but I am not sure. Is the PIC (through the supplied header files) taking care of sending a NAK when there is no new data? Do I need to take care of this data0/data1 bit manually. Also, how can I (without a USB analyzer) set up some kind of test sequence with CCS's debugger to check what exactly is happening?

Any help would be greatly appreciated!!!
Thanks Confused
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group