Hi,
IŽd like to send hexnumbers through the serial interface of a PC to a ” processor.
It works with a terminal, when I hit a key, for example 'a', 0100001 is stored in the ”p register.
This I`d like to accomplish with the following C++ routine:
while(i<rows &&fgets(buff, sizeof(buff), HexCode) != NULL
{
for ( j=0; j<=1; j++ )
{
if (sscanf(&buff[0],"%c%c",&x[i][j])==1)
i++ ;
( Im intending to grab the first two chars of a textfile, resembling the byte in Hex format, like:
FD
9A
DF.......
The send routine through Com1 looks like this:
WriteFile(hCom, &x[][], sizeof (x[][] ), &dwWritten, NULL);
The PC crashes upon compilation, though.
Im I doing the right thing to achiev what I want?
I`d appreciate any help.