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

USB Driver / Mchip demo board

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



Joined: 31 Aug 2008
Posts: 27
Location: Bedford, BEDS UK

View user's profile Send private message Visit poster's website

USB Driver / Mchip demo board
PostPosted: Wed Aug 19, 2009 11:09 am     Reply with quote

Hello everyone,

I'm using a Microchip part # DM300027 demo board.

It has an 18F2450 which it used for USB. For my main processor, I'm using a dsPIC33FJ12GP202. I needed to modify the USB Pic as it wasn't fast enough in UART mode.

The whole project works well in UART mode but is too slow.

The connection between the two PICs is SPI but I'm only using two pins, transmit and clock and I'm not using the CCS routines (clock out manually). For the receiver (dsPIC) I'm using a CNxx port to interrupt on the clock going high. It then reads the data input and the ISR simply buffers up incoming data into a circular buffer. it is possible that usb data could be received into the endpoint buffer during an SPI transmit to the dsPIC.

My remote application is windows/VB6 using the Microchip PIC USB driver.

I have the 18F sending/receiving USB packets OK at full speed. It is supposed to convert the USB bytes into SPI to send it to the main dsPIC.

Since the data is Windows Bitmap data, being sent to an OLED display, I can see that (since the USB is now in high speed (worked OK in uart mode)) I'm missing bits and it's going out of sync.

My question is this:
Is it the case that (Using the CCS USB driver) when the endpoint buffer is full, the remote host should stall and no more data should be sent until the buffer is clear?

This will help me narrow it down since if it is the case that the data is stalled when the USB buffer is full, it must be an SPI problem.

Thanks for your help.

Darren.
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