Re: [DUG] HEX to decimal

2011-08-07 Thread Jeremy Coulter
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

Re: [DUG] HEX to decimal

2011-08-07 Thread Marshland Engineering
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

Re: [DUG] HEX to decimal

2011-08-07 Thread Steven Knight
...@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

Re: [DUG] HEX to decimal

2011-08-04 Thread Marshland Engineering
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

Re: [DUG] HEX to decimal

2011-08-04 Thread Marshland Engineering
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

Re: [DUG] HEX to decimal

2011-08-04 Thread Jeremy Coulter
;> *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 >> >> ** ** >> >

Re: [DUG] HEX to decimal

2011-08-04 Thread Jeremy Coulter
> ** ** > > *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 > > ** ** > > >

Re: [DUG] HEX to decimal

2011-08-04 Thread Steven Knight
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

Re: [DUG] HEX to decimal

2011-08-04 Thread Marshland Engineering
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

Re: [DUG] HEX to decimal

2011-08-03 Thread Todd Martin
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