<div>edit2.text := IntToStr(StrToInt('$' + sRaw));<br><br></div>
<div class="gmail_quote">On Thu, Aug 4, 2011 at 5:50 PM, Marshland Engineering <span dir="ltr"><<a href="mailto:marshland@marshland.co.nz">marshland@marshland.co.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><u></u>
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">I cannot get the decimal equivalent of the number sent from my micro in Delphi !!!</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I am running and ATmega (micro) and it sends out a hex number corresponding to an A to D conversion. It is 8 bit. </font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I'm using SerialNG to read the data with </font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">procedure TfDyno.SerialPortNGRxClusterEvent(Sender: TObject);<br>Var<br> sRaw:String;<br>begin<br> if SerialPortNG.NextClusterSize >= 0 then begin<br> sRaw:=SerialPortNG.ReadNextClusterAsString;<br>
edit2.text:=sRaw;<br> end;<br>end;</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">In the text box I get the ASCII character displayed eg [ { 9 * { } % etc. </font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">How do I get the Decimal equivalent to display. Should be in the range 0-65534.</font></div>
<div> </div>
<div><font face="Arial" size="2">I've spent many hours trying so far !!!</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Cheers Wallace</font> </div></div><br>_______________________________________________<br>NZ Borland Developers Group - Delphi mailing list<br>Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br>
</blockquote></div><br>