Re: PIC18F4550 USB and SPI
Thanks for your support, Susan!
I undestood your point and I agree with it, but I won't use real time SPI with USB. I will give some instructions to slave only in the power up. So, I'll wait for new data to be read, then I'll read continuously.
My code has around 300 lines. So, I will explain as better I can below.
SPI_Write(<hex configurations of slave>) //there are at least 20 instructions to send to slave
void main ()
if pin RB2 = 1; // indicates that new data from slave is ready to be read and it has 27 bytes of binary info
SPI_Read = USB_write_buffer // I would like to send 270 bytes packet to the host
Can I save SPI received data directly into USB RAM? How can I do this? It's like a internal conversion of SPI-to-USB converter.
In this case, it is possible to save the bytes received via SPI into variables, and then write them in the HID_Write?