Hello: This is also a follow up to another post that received no hits. Since then I have some additional information.
I have generated an interrupt off of COM_1314 that looks like:
void COM_1314RxInterrupt(void)
{
int c = COM_1314.getc();
if (isprint(c))
{
COM_2728.printf("We have just read '%c'\r\n",c);
}
else
{
COM_2728.printf("We have just read '0x%02X'\r\n",c);
}
}
(Sorry, I am not sure how to display this as readable code in this forum)
The code works as expected for all *characters*. Essentially I am TerraTerming in on COM_1314 (using my keyboard) and echoing out COM_2728 to see the result.
Where the problem occurs is when I enter in non-ascii code -> the interrupt echos nothing. To try and see what is going on I enter in the ASCII codes on COM_1314 ( ie. ALT-100 -> echos with a 'd')
As before, all ASCII codes up to and including ALT-127 work.
At ALT-128 ('Ç' - the first non-ascii character) the code will respond with TWO!! hex numbers (for a single getc()). Those single numbers are ( 0xC2 and 0xA6) when the other TeraTerm gets this information, it does not know what to do so it simply displayed nothing.
Unfortunately this is a requirement for my program. I need to take non-ASCII data from the serial port and spit it out of the CAN bus. I am unable to do that since I cannot read with any sort of clarity what these two hex values mean.
Can anyone shed a bit of light on this? Is there another ASCII table that consists of two hex values for extended ascii that I am not aware of?
Thank you in advance for your brains.
Hello: This is also a follow up to another post that received no hits. Since then I have some additional information.
I have generated an interrupt off of COM_1314 that looks like:
void COM_1314RxInterrupt(void) { int c = COM_1314.getc(); if (isprint(c)) { COM_2728.printf("We have just read '%c'\r\n",c); } else { COM_2728.printf("We have just read '0x%02X'\r\n",c); } }
(Sorry, I am not sure how to display this as readable code in this forum)
The code works as expected for all *characters*. Essentially I am TerraTerming in on COM_1314 (using my keyboard) and echoing out COM_2728 to see the result.
Where the problem occurs is when I enter in non-ascii code -> the interrupt echos nothing. To try and see what is going on I enter in the ASCII codes on COM_1314 ( ie. ALT-100 -> echos with a 'd')
As before, all ASCII codes up to and including ALT-127 work.
At ALT-128 ('Ç' - the first non-ascii character) the code will respond with TWO!! hex numbers (for a single getc()). Those single numbers are ( 0xC2 and 0xA6) when the other TeraTerm gets this information, it does not know what to do so it simply displayed nothing.
Unfortunately this is a requirement for my program. I need to take non-ASCII data from the serial port and spit it out of the CAN bus. I am unable to do that since I cannot read with any sort of clarity what these two hex values mean.
Can anyone shed a bit of light on this? Is there another ASCII table that consists of two hex values for extended ascii that I am not aware of?
Thank you in advance for your brains.