PIC C - Sending 200 values over USB, but it only sends 25 or so of them...
- by Adam
I have a PIC18F4455 microcontroller which I am trying to use to send 200 values over USB. Basically I am using a for loop and a printf statement to print the values to the usb output stream. However, when the code executes I see in my serial port monitor that it is only sending the first 25 or so values, then stopping. My PIC C code is below. It will send out the 25th or so value (and the comma), but not send anything after and not send a newline character. I'm trying to get it to send all the values, then a newline character at the end. I am sending them all as characters because I can convert them on the PC end of it.
//print #3
for (i = 0; i <= 199; i++){if (data[i]=='\0' || data[i]=='\n'){data[i]++;}}
for (i = 0; i < 199; i++){printf(usb_cdc_putc, "%c,", data[i]);}
printf(usb_cdc_putc, "%c\n", data[199]);