Re: create an array of consecutive integers

2004-06-08 Thread Bob Donnell
If you define the array space outside of the loop, using the
bInitialize Array/b function, wired for the desired number of
elements, then use the bReplace Array Subset/b function to replace
each element as you index through the array, it should initialize a
lot faster, especially for a large array.  As I understand it, using
the loop to build the array (effectively what you're doing) requires
copying the old array to a new array with one additional element,
every time through the loop.  The replacement mechanism just updates a
value in an allocation that's already been created and initialized.
So you avoid large memory allocation tasks and large amounts of
copying of data from the old array to the new one.

Hope that helps.  Sorry this a very 'late' reply - other work has kept
me away too long!

Bob



Re: Question about slow rs232 equipment

2004-04-24 Thread Bob Donnell
If the microcontroller doesn't have a stand-alone async serial port,
it's necessary to bit-bang data in and out.  When doing that there's
no inherent buffering - the microcontroller has to be programmed to
sample (and usually oversample) the incoming data stream to
reconstruct the bits into a byte, which can then be stored.  If the
microcontroller has to accomplish other tasks too, and it doesn't have
enough horsepower, or the programmer wasn't skilled at making it
perform multiple tasks, characters can be lost.  Most current
microcontrollers make this so much easier!

Bob