bela
Joined: 31 Aug 2008 Posts: 27 Location: Bedford, BEDS UK
|
USB Driver / Mchip demo board |
Posted: Wed Aug 19, 2009 11:09 am |
|
|
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. |
|