From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On
Behalf Of Marshland Engineering
Sent: Monday, 8 August 2011 13:06
To: delphi@delphi.org.nz
Subject: Re: [DUG] HEX to decimal
I finally got it working. The number of stop bits was wrong, that's why the
first character
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
iDa
...@delphi.org.nz] On
Behalf Of Marshland Engineering
Sent: Friday, 5 August 2011 3:22 p.m.
To: delphi@delphi.org.nz
Subject: Re: [DUG] HEX to decimal
What version of Delphi are you using? Could the string be returned as a
Unicode string? or is it an AnsiString?I'm using Ver 6
Apparently ORD works w
What version of Delphi are you using? Could the string be returned as a
Unicode string? or is it an AnsiString?I'm using Ver 6
Apparently ORD works with 1 for the first character and not 0 just to be
confusing !!!
PS Using 0 returns a blank.
___
NZ
Adding more characters
serial_send('B');
serial_send('C');
serial_send('D');
serial_send('E');
I get
B(Tú
66 40 84 250
B(Tú
66 40 84 250
___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: htt
;> *From:* delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]
>> *On Behalf Of *Marshland Engineering
>> *Sent:* Thursday, 4 August 2011 7:47 p.m.
>> *To:* delphi@delphi.org.nz
>> *Subject:* Re: [DUG] HEX to decimal
>>
>> ** **
>>
>
> ** **
>
> *From:* delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]
> *On Behalf Of *Marshland Engineering
> *Sent:* Thursday, 4 August 2011 7:47 p.m.
> *To:* delphi@delphi.org.nz
> *Subject:* Re: [DUG] HEX to decimal
>
> ** **
>
>
>
You might need to use the ORD function byte by byte
Steven
From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On
Behalf Of Marshland Engineering
Sent: Thursday, 4 August 2011 7:47 p.m.
To: delphi@delphi.org.nz
Subject: Re: [DUG] HEX to decimal
Been there done that
edit2
Been there done that
edit2.text := IntToStr(StrToInt('$' + sRaw));
Result '[' is not a valid integer.
___
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubsc
edit2.text := IntToStr(StrToInt('$' + sRaw));
On Thu, Aug 4, 2011 at 5:50 PM, Marshland Engineering <
marshl...@marshland.co.nz> wrote:
> **
> 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 cor
10 matches
Mail list logo