HOME - - - - - Lazarus Tutorials TOC - - - - - - Other material for programmers

(filename: dstl1main.htm (with dst*L*!))



MicroLan and 1-Wire and Lazarus Programming

(and some information on hardware issues)

I've created two pages with very similar names: This one, dstl1main.htm in SheepdogGuides.com/lut/, and dst1main.htm, in the root of SheepdogGuides.com.
     What was I Thinking??
This is probably the better page. If it doesn't satisfy all your wants..., SheepdogGuides.com/dst1main.htm has more "stuff"... but is less well written.

The distribution across my web pages of my material about the MicroLan (aka "1-Wire") was somewhat confused... even BEFORE I started THIS page in August 2016... sorry!

Just before we start down the path to the "proper" use of 1-Wire chips, let me mention that they can be used in a very simple, very direct way. If you have a microprocessor, and just want to hook up to one or two 1-Wire chips, I have a page about that for you.

In August 2016, I had a great deal (quantity, if not quality, I fear) of material on the web about using Dallas 1-Wire. But from the perspective of a Delphi programmer.

In August 2016, I spent a few days doing a "hello world" program with 1-Wire and Lazarus...

Part One... gentle beginnings... Using 1-Wire/ MicroLans/ TMEX with Lazarus

...which (Lazarus) I really like, by the way... and this "index" was born. I hope it will grow.

And now there's a THIRD! version !!! ....

Part Three: Using 1-Wire/ MicroLans/ TMEX with Lazarus. Read a DS18B20 temperature sensor.

The "Part Three" essay (also with the sourcecode provided in a zip archive) takes the second program, and reworks it very considerably... without actually much changing WHAT IT DOES. But now everything is "packaged" better, with details hidden away in subroutines and the subroutines hidden away in generalized support units.


Other 1-Wire stuff

Besides the above, newly minted (8/16), and fully Lazarus friendly, I offer lots of good 1-Wire stuff at my old "1-Wire by Delphi" pages... and using Lazarus is much like using Delphi.

For those who are already convinced to try 1-Wire / MicroLans, I've produced a "How do I get started" page for you, which will open in its own tab/ window.

Just before we start down the path to the "proper" use of 1-Wire chips, let me mention that they can be used in a very simple, very direct way. If you have a microprocessor, and just want to hook up to one or two 1-Wire chips, I have a page about that for you.

MicroLan and 1-Wire are registered trademarks of Dallas Semiconductor, aka Dalsemi, now part of Dallas/Maxim. I have no connection with them apart from being a happy user of their products. My use of the chips is primarily in weather logging applications, though they can be used for many things; a hamster's night-time wheel use was monitored with MicroLan chips, for instance.

There are more notes at the bottom of the page about other offerings, my editorial philosophy, how to email me, and a search engine to help you find things.



- - - - - - - - - - - - - - - - - - -


Notes on various temperature sensors Do you want a DS1820? DS18B20? DS1822? Etc. (This is a link to something on the old "Delphi 1-Wire" website, but it is mostly language independent.)

Equally valid, Lazarus or Delphi

I worked with 1-Wire via Delphi for a long time before moving to Lazarus. The following are in my "1-Wire programming with Delphi" site... but have been checked to work with Lazarus equally well.

Most, if not all, of what is in the Delphi collection of 1-Wire tutorials will probably be useful, and need little modification to Just Work with Lazarus. But the following have been checked.

If you download sourcecode from the other site, "little things" like how Lazarus names the various files which make up a project will be a nuisance... but not a huge nuisance, I hope.

Using the checksum mechanism provided by 1-Wire: You don't NEED to use it... but you should! (^_^) It can validate, for instance, the bytes sent from chips to the master when the master requests the contents of a chip's scratchpad.


"TMEX":

The term TMEX, if I read something correctly at 3/11, is being deprecated by Dallas. But you will see it across these pages because I think it is a more Google- friendly way to refer to the API for working with 1-Wire chips and MicroLans


Website and book:

An "ad" for another source of information on sensing the weather: Weathertoys is not only a website, but also of a book. Both discuss lots of fun things about building your own weather station, and include sourcecode. There is good coverage of using 1-Wire devices, but both the book and the site look at other answers, too. In May 2007, it was quite recently launched, but the site is not "under construction". There's lots of good stuff there.




FarWatch

Do you have an "always on" internet connection, e.g. DSL or broadband? (Even a basic home user account is fine. You don't need a fixed IP address.) Want to set something up that lets you check all is well at your home or business.... from any internet terminal in the world? (The terminal needs nothing more than a standard browser.) You don't have to spend anything on software, everything you need is free. You might want to dedicate an old Win98 "box" to doing the work, but you don't have to. You'll probably want to spend a little money to attach one or more 1-Wire temperature sensors to the system, but there are ways around even that expense.

Sound interesting? See the pages about my FarWatch system.




Editorial Philosophy

I dislike 'fancy' websites with more concern for a flashy appearance than for good content. For a pretty picture, I can go to an art gallery. Of course, an attractive site WITH content deserves praise... as long as that pretty face doesn't cost download time. In any case....

<PS.... I wrote the following before getting into the fine points of what I intended. Implementation has proved to be a pain, and I'm experimenting with different solutions. You'll find some tutorials are heavily infested with HTML code. Is this a problem? You can still save the pages from a browser, and re-load them from your hard-disc later, off-line. OpenOffice takes HTML in its stride. With WordPerfect, you can load the .htm file, select all, copy to clipboard, start a new WordPerfect document, then paste in the text, mostly intact and cleaned of HTML. (Hard to describe, easy to do.)>

You should be able to read the tutorials on-line without difficulty. However, you should ALSO find it easy to capture them for off line use, including editing for your own purposes. The following should work. I would suggest that you create a folder for the tutorials so that you can retain my filenames with no risk of clashes. (The following is, of course quite dated. Still works... but... unnecessary?)

On-line, use your browser to view the tutorial you want to capture.

Use File|Save As... to save the web-page to your disc. At this point you can log off, or visit other pages, perhaps saving them, too.

When you have logged off, start Notepad (or Textpad, or anything you like, but then you're on your own <g>). Load the file you saved. Turn word-wrap on. (Notepad: Edit|Word-wrap.)

Snip off the html header and footer. <In one 'solution', you will also have to remove all <BR>. and <BR>s from the text (Textpad can to this.) Sorry... working on it!>

Re-save... you should now have the tutorial in a nice, tidy, uncomplicated text file.

________

Filenames: I've tried to be organized: Names start PT or DT for Pascal/ Delphi Tutorial. Next is a digit, for the level, then I've used letters one after the other, e.g. DT1a, DT1b, DT1c. The letter doesn't mean much... it just shows when I got around to that particular topic! With the MicroLan stuff, that is getting a little confused. Files about MicroLan created after 8/03 may be prefixed DST, but that is not all of the MicroLan stuff.

   Search this site or the web        powered by FreeFind
 
  Site search Web search
Site Map    What's New    Search   BEWARE: There is stuff at my other two sites that this search won't reveal. Go to either site (see links below) and use that site's FreeFind search button.

In addition to the tutorials for which this page serves as Table of Contents, I have other sites with material you might find useful.....

Sheepdog Software homepage.
My Arunet homepage.
... and some links to specific pages within them you might want....

Main index to MicroLan stuff.
Some pages for programmers.
Using the parallel port with programs written in Delphi.


Ad from page's editor: Yes.. I do enjoy compiling these things for you... hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!
Click here to visit editor's freeware, shareware page.

Link to Tutorials main page
Here is how you can contact this page's author, Tom Boyd.


Valid HTML 4.01 Transitional Page has been tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org. Mostly passes.

AND passes... Valid CSS!

If this page causes a script to run, why? Because of things like Google panels, and the code for the search button. Why do I mention scripts? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....