[DUG] HEX to decimal
Marshland Engineering
marshland at marshland.co.nz
Thu Aug 4 17:50:47 NZST 2011
I cannot get the decimal equivalent of the number sent from my micro in Delphi !!!
I am running and ATmega (micro) and it sends out a hex number corresponding to an A to D conversion. It is 8 bit.
I'm using SerialNG to read the data with
procedure TfDyno.SerialPortNGRxClusterEvent(Sender: TObject);
Var
sRaw:String;
begin
if SerialPortNG.NextClusterSize >= 0 then begin
sRaw:=SerialPortNG.ReadNextClusterAsString;
edit2.text:=sRaw;
end;
end;
In the text box I get the ASCII character displayed eg [ { 9 * { } % etc.
How do I get the Decimal equivalent to display. Should be in the range 0-65534.
I've spent many hours trying so far !!!
Cheers Wallace
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110804/4d12b876/attachment.html
More information about the Delphi
mailing list