0

i am receiving and sending data between pc-chipcon board through serial port .the incomming data is link quality packet.i want to check the value of link quality and by observing the value i should send another signal to increase power in the chipcon board .


iam having problem with the received packet .i dont know how to observe the value of the received packet either in integer or hexadecimal format .the received data from serial port will be in the form of hexadecimal number then how i sould convert the received packet from hexadecimal number to decimal or is there any another way to receive packet in decimal form .can any one tell me how to take the data which i received for manipulating.

this is c++ code to receive data from serial port


....................................................................................
char rs_getch(const int io_port)
{
char rxchar;
BOOL bReadRC;
static DWORD iBytesRead;
bReadRC = ReadFile(hCom, &rxchar, 1, &iBytesRead, NULL);
if (iBytesRead)
return rxchar;
else return 0; // return 0 if no character read
}]
............................................................................

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by Salem
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.