I'm sending data from an ATmega in the form of 16 bit (2 bytes). I have a serial component in Delphi which receives the data.
- If I send a String (e.g.
'FF'
), I get the data added to my Memo component. All fine. - However, if I send the raw hex
$FF
, I get a receive data blink saying "data received" but nothing is added to the Memo component's lines. I'm not sure how to convert this data into an Integer or String, something I can use.
A solution would be good but an explanation on how Delphi sees String
, Char
, etc. would be nice. Thanks.
When you receive data, you can cast them to bytes (if needed) and tranform into hex representation.
For example, if you get
AnsiString
: