Hello,
I'm working with custom pcb measuring current and want to send the data trough usb to display in windows. EFM8ub10 is the mcu.
I got it to ping pong values. I send "1" trough windows app, MCU sends back "1".
The problem is I want to send current data. Not sure how to implement data into transmit data. When sending value = 1 to mcu I though I can read it from Rx_Packet[0] buffer.
But that's not the case. Sent value = buffer[0]
1 = 12580
2 = 12834
3 = 13092
When I check buffer[0] [1] etc values change, but they don't make sense.
I also tried strcmp, but doesn't recognize command buffers.
I'm working with custom pcb measuring current and want to send the data trough usb to display in windows. EFM8ub10 is the mcu.
I got it to ping pong values. I send "1" trough windows app, MCU sends back "1".
The problem is I want to send current data. Not sure how to implement data into transmit data. When sending value = 1 to mcu I though I can read it from Rx_Packet[0] buffer.
But that's not the case. Sent value = buffer[0]
1 = 12580
2 = 12834
3 = 13092
When I check buffer[0] [1] etc values change, but they don't make sense.
I also tried strcmp, but doesn't recognize command buffers.
Code:
char Data;
volatile uint8 res2[2]={0};
Data = RX_Packet[0];
sprintf(res2,"%d",Data);
for (i=0; i<InCount;i++) // Copy received packet to output buffer
{
TX_Packet[i] = RX_Packet[i];
}
Attachments
-
19.3 KB Views: 7

