cipi-cips
Member level 4
- Joined
- Jun 30, 2008
- Messages
- 76
- Helped
- 2
- Reputation
- 4
- Reaction score
- 1
- Trophy points
- 1,288
- Activity points
- 1,867
Hello
I have one little problem if anyone can help
I have manage to find Firmware and Software to control PIC via USB.
Firmware is created in Microchips C18 Compiler, and software is created in C#.
In firmware and software I can set how many USB buffers will be and it is set to 65 (fromHostToDeviceBuffer[65]) for sending and 65 for receiving.
I have 6 servo motors on six ports of PIC (18F4550) and when I send signal for each servo I am using function
fromHostToDeviceBuffer[1] //send data in buffer 1 for 1 servo
fromHostToDeviceBuffer[2] //send data in buffer 2 for 2 servo
fromHostToDeviceBuffer[3] //send data in buffer 3 for 3 servo
fromHostToDeviceBuffer[4] //send data in buffer 4 for 4 servo
fromHostToDeviceBuffer[5] //send data in buffer 5 for 5 servo
And this all works fine I can control 5 servos, but problem comes when I add 1 more servo and one more function to call
fromHostToDeviceBuffer[6] //send data in buffer 6 for 6 servo
when I add this everything stops software blocks and I cant send anything, it is like when I added one more data in one more buffer USB is getting over stacked with data and it cant operate.
All data that I send for each servo are bytes.
Do I send to much data ? Do I need to put some delay between sending each data ?
I have one little problem if anyone can help
I have manage to find Firmware and Software to control PIC via USB.
Firmware is created in Microchips C18 Compiler, and software is created in C#.
In firmware and software I can set how many USB buffers will be and it is set to 65 (fromHostToDeviceBuffer[65]) for sending and 65 for receiving.
I have 6 servo motors on six ports of PIC (18F4550) and when I send signal for each servo I am using function
fromHostToDeviceBuffer[1] //send data in buffer 1 for 1 servo
fromHostToDeviceBuffer[2] //send data in buffer 2 for 2 servo
fromHostToDeviceBuffer[3] //send data in buffer 3 for 3 servo
fromHostToDeviceBuffer[4] //send data in buffer 4 for 4 servo
fromHostToDeviceBuffer[5] //send data in buffer 5 for 5 servo
And this all works fine I can control 5 servos, but problem comes when I add 1 more servo and one more function to call
fromHostToDeviceBuffer[6] //send data in buffer 6 for 6 servo
when I add this everything stops software blocks and I cant send anything, it is like when I added one more data in one more buffer USB is getting over stacked with data and it cant operate.
All data that I send for each servo are bytes.
Do I send to much data ? Do I need to put some delay between sending each data ?