[DUG] HEX to decimal

Marshland Engineering marshland at marshland.co.nz
Mon Aug 8 13:05:49 NZST 2011


I finally got it working. The number of stop bits was wrong, that's why the 
first character was always correct and the rest incorrect.

Final code

  if SerialPortNG.NextClusterSize >= 0 then begin
       sRaw:=SerialPortNG.ReadNextClusterAsString;
       for i:=1 to length(sRaw) do
           iData[i]:= byte(sRaw[i]);

Thanks Wallace



More information about the Delphi mailing list