Hi KPL,
Here's a JAL version of the original Dallas application code for 8-bit
processors. It's
basically the Dallas 1-wire search routine with wrappers calling the
existing, JAL2
1-wire read and write functions. The only thing you need to do is to
add handlers for
each type of 1-wire device that you're using (the DS18S20 thermometer is
already
in there and I have some code for the DS1822 in another version
somewhere, if I
can find it).
http://www.pucebaboon.com/JAL2/1-wire-search.tar
The main problem with the search routine is that it uses a -lot- of
memory for those
massive serial/ID numbers. If you're only ever planning to use one type
of device
and no CRC, then you could save a lot of memory and increase the number
of
devices on your bus by just ignoring those parts of the serial number.
Having said that, this
is never going to be viable for the smaller PICs (you might only be able
to handle one
or two sensors).
From the original directory I can see that this was last compiled on Jan
1st, which means it
was using this version of JAL2:- jallib-pack-bee-jalv24q-20131124.
As always, improvements and bug reports welcomed.
-John Little-
On Wednesday, 26 November 2014 22:36:59 UTC+9, KPL wrote:
>
> Hi,
>
> I have used ds18b20 library from jallib many times, but now I would
> like to read multiple sensors, connected to the same bus. The only
> example I see in trunk is tst_ds18b20_multi_serial.jal, which just
> reads predefined sensors, by their ID's - but can not detect sensors
> and their ID's by itself.
>
> The only mentioning of search algorithm done in JAL i see here:
> http://mientki.ruhosting.nl/data_www/pic/libs_hw/dallas_1_wire.html
> but link to include file delay_20mc.jal returns 404, and procedure
> itself seems complicated, together with bank_arrays.
> Are there any other attempts at this?
>
> I am reading AN187, but... somehow... probably need more sleep or
> something.
>
> The general idea is to build a device with currently "hot" ESP8266
> module, which would periodically check sensors connected to it, and
> send sensor id's together with corresponding temperatures to a web
> server.
>
> --
> KPL
>
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib.
For more options, visit https://groups.google.com/d/optout.