TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139259 times)
  2. FAT32 Library (71751 times)
  3. Network Ethernet Library (57123 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43086 times)
  6. FT800 Library (42404 times)
  7. GSM click (29835 times)
  8. mikroSDK (28078 times)
  9. PID Library (26885 times)
  10. microSD click (26198 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Example

One-Wire Search Demo

Rating:

5

Author: Jim Walsh

Last Updated: 2017-06-19

Package Version: 1.0.0.0

Example: 1.0.0.0

Category: Communication

Downloaded: 917 times

Followed by: 1 user

License: MIT license  

A small example project (PIC18F45K22) that demonstrates using Maxim's search algorithm to find and identify any 1-wire devices connected to the bus. The demo program searches the bus and sends the ROM code of any devices it finds thru the UART port.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "One-Wire Search Demo" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "One-Wire Search Demo" changes.

Do you want to report abuse regarding "One-Wire Search Demo".

  • Information
  • Comments (2)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Example Blog

This example demonstrates using Maxim's search algorithm to find and identify any 1-Wire devices that are connected to the bus.  The program searches the bus for 1-Wire devices and sends the ROM code of any that it discovers thru the UART port.  It also shows an example of a targeted search that will find only devices of a certain 'family' , in this case 0x28 (DS18B20) and 0x10 (DS18S20) , as well as an 'exclusive' search that will find all devices except for a certain family. To start the demo, fire up the MikroE UART terminal (or whatever program blows your hair back) and send an 'S' to the PIC.  In theory this will work with any 1-Wire devices on the bus, but all I had on hand to test with was a DS18S20 and a couple of DS18B20 temp sensors.  Here are some of the results I got using various combinations...

Screen Shot 1

Screen Shot 1

All 3 sensors connected...

View full image
Screen Shot 2

Screen Shot 2

Only the 2 DS18B20 devices connected...

View full image
Screen Shot 3

Screen Shot 3

Only the single DS18S20 connected...

View full image
Screen Shot 4

Screen Shot 4

No devices connected...

View full image

Here is a shot of the example showing the 'exclusive' search results.  I left these out of the other examples so the whole display would fit in the screen shot without having scroll bars...    :)

Screen Shot 5

Screen Shot 5

All 3 sensors connected...results with 'exclusive' searches added...

View full image

ALSO FROM THIS AUTHOR

I2C Library for Newhaven Display Serial LCD Modules

4

A collection of functions that handle I2C communications with Newhaven Display's PIC16F690 controlled LCD modules (model numbers ending in '-V3').

[Learn More]

U.S. State Capitals Game

5

A geography quiz game for EasyPIC v7 with touch panel GLCD module.

[Learn More]