putUSBUSART Data transfer size

Post
ahmed380
New Member
2009/05/25 19:38:55
Hi All,
 
I am new to this forum world.Its my first post!
 
I have been playing with Microchip 12bit controllers for over a year now.
I have a problem when using the Microchip CDC serial emulation code that works over the USB. When I use the putUSBUSART function with small sized data, then i am able to connect using my hyperterminal to the emulated serial port. But when I pass a slightley more data to the putUSBUSART function, then I can't connect at all!
 
The following is how I use the function :
 
 putUSBUSART(USB_In_Buffer,strlen(USB_In_Buffer));

 
The problem happens when formatting the USB_In_Buffer variable like that:
 
sprintf(USB_In_Buffer,"%ld,%ld,%ld,%d,%d,%d,%d,%d,%d,%d,%d,%u,%u,%u,%u,%u,%u,",mposition,position,error.l,mvelocity,ypid.i[0],
                kp,ki,kd,phase1dist.i[0],vlim,accel.i[0],
                stat.saturated,stat.run, stat.motion,
                stat.phase, stat.neg_move,PORTBbits.RB2);

 
But when I use the same above line but with only five variables instead, then everything works fine.
I know that the maximum string you can pass is 255 bytes, but I don't think I passed that limit yet.
 
Thanks in advance for reading!

ahmed380
New Member
RE: putUSBUSART Data transfer size 2009/05/26 07:43:23
Can someone help please?
I am the only one that has zero replies!!!