Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | Re: get bytes from com ... until special character

Discussion forum for the BasicX family of microcontroller chips.

Re: get bytes from com ... until special character - spatial_klode - Nov 6 12:12:01 2007

Thanks a Lot, Fabrizio!
with the command:

[...] Loop Until cmd_in_buffer(i-1) = 88

works great. Now I make other test, about the maximum lenght of this
array.

to Tom:
These two variables are declared into the sub Main(). are this either
less than 160 bytes?
Thanks again for all your supply!
to Fabrizio: I'm Italian too ;)
--- In b...@yahoogroups.com, Fabrizio Sellone
wrote:
>
> Here is a weak proposal .... but if you are lucky enough it can even
make your point ...
>
> How about replacing the time consuming statement
>
> while cmd_in_buffer(i-1) <> 88
>
> with others like
>
> until cmd_in_buffer(i-1) = 88
> or
> while cmd_in_buffer(i-1) - 88
>
> Regards,
>
> Fabrizio
> To: basicx@...: gtbecker@...: Tue, 6 Nov 2007 11:21:42 -0500Subject:
Re: [BasicX] get bytes from com ... until special character
> > dim cmd_in_buffer(1 to 160) as byte> dim cmd_out_buffer(1 to 160)
as byte> Perhaps you've exhausted the stack. Is it necessary for these
buffers to be this large? The BX-24 has 401 bytes of available RAM;
you've used 320 of that for these variables. That leaves 81 bytes for
the system stack and other variables. Depending on your code, that
might be insufficient.Try decreasing the 320-byte buffer lengths to
perhaps find more success.Tom
> _________________________________________________________________
> Scarica GRATIS la versione personalizzata MSN di Internet Explorer 7!
> http://optimizedie7.msn.com/default.aspx?mkt=it-it
>
> [Non-text portions of this message have been removed]
>



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: Re: get bytes from com ... until special character - Tom Becker - Nov 6 12:34:51 2007

> ... Loop While cmd_in_buffer(i-1) <> 88
> ... Loop Until cmd_in_buffer(i-1) = 88

These are logically identical expressions; they should not behave
differently. If they do, look elsewhere, particularly at stack space.
Tom



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )