Reply by Mike Perks May 8, 20052005-05-08
Tom,

Yes I believe if you are not using random numbers then these 4 bytes are
safe to be reused for other purposes. Randomize seems to be the only
routine that writes to this memory location. Here is the BasicX
equivalent code for the system library routine Randomize() when I look
at is with bxDism.

Sub Randomize()
Dim t as Single
t = Timer()
Call BlockMove(4, MemAddressU(t), MemAddressU(sys~mathlibrary.sys~seedprng))
If sys~mathlibrary.sys~seedprng = 0 Then
sys~mathlibrary.sys~seedprng = 1
End If
End Sub

Mike
http://home.austin.rr.com/perks/basicx/bxDism/

> Mike, bxDism shows that global SeedPRNG is unreferenced; it seems to be
> present whether Rnd is used or not. Is there any reason why I can't use
> it as a long var?
>
> It seems to work; is it used by the system anywhere else? > Tom




Reply by Tom Becker May 8, 20052005-05-08
Mike, bxDism shows that global SeedPRNG is unreferenced; it seems to be
present whether Rnd is used or not. Is there any reason why I can't use
it as a long var?

It seems to work; is it used by the system anywhere else? Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


Reply by Kevin May 8, 20052005-05-08
On Fri, May 06, 2005 at 04:05:01PM -0500, Carol wrote:
> Has anyone stumbled across information on attempts to download code to a
> BX24 via RF or IR. One could not verify a download in the usual manner
> of course but still it would be a useful trick.

Maybe there's some kind of wireless relay you can get for serial/USB that
might do the trick in a roundabout way.

- Kevin



Reply by Carol May 8, 20052005-05-08
BOYD S.(SPENCE) MINER wrote:

> HAVE YOU LOOKED INTO THE RS-232 BLUETOOTH DEVICES FROM
> HTTP://WWW.AIRCABLE.COM
>
> I USE THEM BETWEEN 2 PC'S AND ALSO BETWEEN A PC AND A TERMINAL NODE
> CONTROLLER(TNC) YOU CAN GET THEM WITH MALE OR FEMALE CONNECTORS. BEST
> COMBO I
> HAVE FOUND IS ONE MALE/ONE FEMALE AND USE GENDER CHANGER IF NEEDED.
>
> 73
> SPENCE
> K4KEP >
> *>. >
>
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.308 / Virus Database: 266.11.6 - Release Date: 5/6/2005
I had not looked at them before but these seem to be pretty nifty
devices. I have a project in which an rf receiver is already attached
to a BX24 so as to control other devices via the BX24. The thing is the
rf/BX24 objects are in a sealed box so if I wish to reprogram I need to
break into the box which is a real pain. I suppose that I COULD stick
yet another component in the box but it seems a shame being that one
receiver is already in there. The receiver is connected to pin 12 and I
will continue to brainstorm somehow downloading code through this link.
A second eeprom maybe???



Reply by Tom Becker May 7, 20052005-05-07
> HAVE YOU LOOKED INTO THE RS-232 BLUETOOTH DEVICES FROM

Probably you mean http://www.aircable.net but have you tried these
modules specifically with the BX-24 IDE and achieved reliable downloads
through them, Jim? Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


Reply by BOYD S.SPENCE MINER May 7, 20052005-05-07
HAVE YOU LOOKED INTO THE RS-232 BLUETOOTH DEVICES FROM HTTP://WWW.AIRCABLE.COM

I USE THEM BETWEEN 2 PC'S AND ALSO BETWEEN A PC AND A TERMINAL NODE
CONTROLLER(TNC) YOU CAN GET THEM WITH MALE OR FEMALE CONNECTORS. BEST COMBO I
HAVE FOUND IS ONE MALE/ONE FEMALE AND USE GENDER CHANGER IF NEEDED.

73
SPENCE
K4KEP


Reply by Tom Becker May 7, 20052005-05-07
> ... BX24 via RF...

My rotating project platform carries a TDK Blu2i transceiver module in
cable-replacement mode that is great for application data both ways at
115200 (very cool to control it with a Bluetoothed PDA, from 300 feet),
but it is slow in toggling DTR/ATN. Sometimes I can get a successful
download through it, but more often not. Other Bluetooth solutions
might work better.

Now that I think about it, I haven't tried the BX-24p in that socket;
it's ATN signaling is simpler. I'll give it a shot tomorrow. Tom
Tom Becker
--... ...--
GTBecker@GTBe... www.RighTime.com
The RighTime Clock Company, Inc., Cape Coral, Florida USA
+1239 540 5700


Reply by Carol May 7, 20052005-05-07
Thanks Mike, this will get me started at least. It will probably turn
out that I will teach myself why I don't want to do it but one never
knows until one tries.

Mike Perks wrote:

> Carol,
>
> The simple answer to your question is that you can only download a
> program via the serial port or USB if you have a USB to RS232 converter.
>
> The more complex answer is that there are some ways to do it, if you
> want to invest in some effort:
>
> 1. Write a bootloader program in BasicX that communicates via IR and
> overwrites some or all of itself. I have attempted some self-modifying
> BasicX code before and it is not easy to get right. Knowing about the
> internals of BasicX certainly help (see
> http://home.austin.rr.com/perks/basicx/Articles/)
> <http://home.austin.rr.com/perks/basicx/Articles/%29>
>
> 2. Invest in a second BX-24 (loader) that communicates with the first
> one (master). When a new program is ready to be downloaded, the master
> one gets into an idle condition, the loader receives the code and writes
> it to the EEPROM attached to the master using the SPI port. The loader
> should probably keep the master RESET low, and uses says pin 20 as the
> CS for the master EEPROM. Obviously you will need to connect the
> corresponding MOSI, MISO and SCK pins together as well. The loader can
> verify that the EEPROM is stored and release the RESET line. The master
> should now execute the new program.
>
> Mike
>
> > Has anyone stumbled across information on attempts to download code to a
> > BX24 via RF or IR. One could not verify a download in the usual manner
> > of course but still it would be a useful trick.
> >
>
> *>. >
>
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.308 / Virus Database: 266.11.5 - Release Date: 5/4/2005




Reply by Mike Perks May 6, 20052005-05-06
Carol,

The simple answer to your question is that you can only download a
program via the serial port or USB if you have a USB to RS232 converter.

The more complex answer is that there are some ways to do it, if you
want to invest in some effort:

1. Write a bootloader program in BasicX that communicates via IR and
overwrites some or all of itself. I have attempted some self-modifying
BasicX code before and it is not easy to get right. Knowing about the
internals of BasicX certainly help (see
http://home.austin.rr.com/perks/basicx/Articles/)

2. Invest in a second BX-24 (loader) that communicates with the first
one (master). When a new program is ready to be downloaded, the master
one gets into an idle condition, the loader receives the code and writes
it to the EEPROM attached to the master using the SPI port. The loader
should probably keep the master RESET low, and uses says pin 20 as the
CS for the master EEPROM. Obviously you will need to connect the
corresponding MOSI, MISO and SCK pins together as well. The loader can
verify that the EEPROM is stored and release the RESET line. The master
should now execute the new program.

Mike

> Has anyone stumbled across information on attempts to download code to a
> BX24 via RF or IR. One could not verify a download in the usual manner
> of course but still it would be a useful trick.
>



Reply by tombhandley May 6, 20052005-05-06
Carol, you can build a LASER range finder from scratch but it would
require a variety of engineering disciplines and a thorough knowledge
of optics. Tom Becker said he was able to reach a 1/4" accuracy and I
think you might want to take a look at his comments as far as a cable
and an idle wheel. If you can spend money, do a web search for very
accurate LASER sensors but they are expensive...

- Tom

--- In basicx@basi..., Carol <carolkysela@y...> wrote:
> I appreciate all the discussion. I haven't had time to check out
> inexpensive laser range finders yet but something hacked is
probably
> what would have to be used I don't really understand laser range
> finding and this would be a good topic for me to study as well. Is
it
> possible to build a laser range finder from readily available
components?.
>
> tombhandley wrote:
>
> > Tom, I was in wrong about the Sears/Craftsman unit. It uses a
LASER
> > for pointing and a US sensor for measuring. I did a google search
of
> > LASER distance measuring devices and found many with a resolution
> > from 3mm and below. In anycase, this is a 'dead horse'...
> >
> > - Tom
> >
> > --- In basicx@basi..., "Tom Becker" <gtbecker@r...> wrote:
> > > > ... hack a Craftsman or Radio Shack unit...
> > >
> > > I'm not aware that a consumer laser rangefinder for short
distances
> > > exists, Tom; the short-range distance devices are usually
> > ultrasonic, I
> > > believe, and the laser devices that fill the shelves are just
> > straight
> > > line makers.
> > >
> > > Golf and hunting laser rangefinders can't see less than 30 feet
or
> > so -
> > > and then with poor resolution of a yard or meter - but can
range a
> > > building at 1000 feet; they won't help with this app.
> > >
> > >
> > > Tom
> > >
> > >
> > >
> > > Tom Becker
> > > --... ...--
> > > GTBecker@R... www.RighTime.com
> > > The RighTime Clock Company, Inc., Cape Coral, Florida USA
> > > +1239 540 5700
> >
> >
> >
> > ------------------------------
------
> > *>.
> >
> >
> >-------------------------------
-----
> >
> >No virus found in this incoming message.
> >Checked by AVG Anti-Virus.
> >Version: 7.0.308 / Virus Database: 266.11.5 - Release Date:
5/4/2005
> >
> >