using two DS-1820 or more at the same line/connection?

General discussion on mikroC.
Author
Message
MasterBlaster
Posts: 165
Joined: 25 Oct 2007 22:22
Location: Wuppertal, Germany, Earth... :-)
Contact:

using two DS-1820 or more at the same line/connection?

#1 Post by MasterBlaster » 21 Dec 2008 00:10

Hi all,

has anyone a c-code for using 2 or more DS1820 at the same time on the
same one wire line?
so long,
MasterBlaster.

Using: EasyPIC4 HW. Rev. 1.03, LCD- & GLCD Display, NetWork and SD/MMC Adapter,
reg. MikroC Pro for PIC 2009, PIC 16F877A, 18F452 and 18F4685 with 8/20 MHz Xtal.

SPONTEX
Posts: 22
Joined: 13 Jun 2007 07:31

#2 Post by SPONTEX » 26 Dec 2008 18:34

Hello MasterBlaster,

here you'll find some precious informations.
Good luck.
http://pdfserv.maxim-ic.com/en/an/AN187.pdf

SPONTEX
Posts: 22
Joined: 13 Jun 2007 07:31

#3 Post by SPONTEX » 27 Dec 2008 17:13


MasterBlaster
Posts: 165
Joined: 25 Oct 2007 22:22
Location: Wuppertal, Germany, Earth... :-)
Contact:

more than 1 DS1820 device on 1-Wire.

#4 Post by MasterBlaster » 27 Dec 2008 20:05

Hi SPONTEX,

thanks a lot for your sugesstions and/or infos!
so long,
MasterBlaster.

Using: EasyPIC4 HW. Rev. 1.03, LCD- & GLCD Display, NetWork and SD/MMC Adapter,
reg. MikroC Pro for PIC 2009, PIC 16F877A, 18F452 and 18F4685 with 8/20 MHz Xtal.

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: using two DS-1820 or more at the same line/connection?

#5 Post by Dany » 28 Dec 2008 10:16

MasterBlaster wrote:Hi all,
has anyone a c-code for using 2 or more DS1820 at the same time on the
same one wire line?
No, I have no code, but:
- If you know the ROM code of the two devices (see next point), then it both can be addressed separately by using the "MATH ROM" command in stead of the "SKIP ROM" command.

- To find the rom address of a DS1820 devive: with only 1 device on the 1 wire bus its ROM code can be read with the "READ ROM" command.

This is I think, the simplest way to handle 2 (or more) devices.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

MasterBlaster
Posts: 165
Joined: 25 Oct 2007 22:22
Location: Wuppertal, Germany, Earth... :-)
Contact:

Re: using two DS-1820 or more at the same line/connection?

#6 Post by MasterBlaster » 28 Dec 2008 12:16

Thanks a lot Dany,

yes i think that will be the right way.

I want to use 2 or more DS1820 devices in my Helicopter, to display onto
my remote control the temperature of the 2 or more engines (motors) in
it when i fly with him - perhaps later also for one tail rotor engine.

I want to have only the following informations onto my remote control
(RC) on an additional (DEM16226 SYH-LY/A) 2Line 16-Char LCD:

- temperatur of all electrical engines (motors)
- Accu voltage of Lithium-Polimer and temperature,
- blinking illumination (only 50ms with Luxeon Highpower-LED's in red and green)
- on the front of the helicopter a 2 Luxeon-LED 1W warmwhite headlight.

The results will be transfered with a SPI RF-Module with 433 Mhz technologies
from the helicopter to my RC (with a max. distance of 300m).

Image

A further little challenge for my actual private project... 8)

My little helicopter:
Image

Other any idears? :roll:

Thanks a lot for your help at all![/img]
so long,
MasterBlaster.

Using: EasyPIC4 HW. Rev. 1.03, LCD- & GLCD Display, NetWork and SD/MMC Adapter,
reg. MikroC Pro for PIC 2009, PIC 16F877A, 18F452 and 18F4685 with 8/20 MHz Xtal.

Acetronics
Posts: 715
Joined: 27 Dec 2006 14:33
Location: Le Tréport , FRANCE

#7 Post by Acetronics » 28 Dec 2008 14:45

Hi, Mastermachin

While browsing my demo programs of the C Compiler ... :lol:

I found a program called "I Button"

MkC\Examples\Easy5\ExtraExamples\Button Dallas\P16\16F877\IButton ...

and it deals with the serial IDs ...

Wonderful, no ???
:wink:


Alain

MasterBlaster
Posts: 165
Joined: 25 Oct 2007 22:22
Location: Wuppertal, Germany, Earth... :-)
Contact:

#8 Post by MasterBlaster » 28 Dec 2008 15:17

Acetronics wrote:I found a program called "I Button", MkC\Examples\Easy5\ExtraExamples\Button Dallas\P16\16F877\IButton ... and it deals with the serial IDs ...Alain
Hi Alain,

thank you for your suggestions, but when i have to do it with the DS18x20
with more than one devices on 1-Wire, reading there ROM-ID's and using
this for selection if found a couple of them. It's seems like that the I-Button
example hasn't the same progress as like as i need for.
so long,
MasterBlaster.

Using: EasyPIC4 HW. Rev. 1.03, LCD- & GLCD Display, NetWork and SD/MMC Adapter,
reg. MikroC Pro for PIC 2009, PIC 16F877A, 18F452 and 18F4685 with 8/20 MHz Xtal.

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#9 Post by Dany » 28 Dec 2008 15:49

Hi MasterBlaster,
Triggered by your post I have added the necessary routines to the "DS1820" unit to be found on the website with URL below, section Units.
Have fun!

See also http://www.mikroe.com/forum/viewtopic.p ... c&start=64 for some info on the DS1820 unit.

Edited on 1-1-2009: An example of using more than one DS1820 on the same one wire bus has been added, see http://www.mikroe.com/forum/viewtopic.p ... c&start=66
Last edited by Dany on 01 Jan 2009 17:46, edited 2 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

sonnyk
Posts: 245
Joined: 08 Nov 2005 19:25
Location: Sweden

#10 Post by sonnyk » 28 Dec 2008 16:03

Hello MasterBlaster.

Nice hobby you have :) , I'm also in the fantastic RC world.
Some considerations, your idea on sending telemetry data back to you is nice, but have in mind that is NOT easy to take your eyes from a RC heli when flying to look on a small display, you just don't have the time to do it.
Your coax heli is very stable, or should be anyway, so you MAYBE have a short split-second to look elsewere, just maybe.

I have built systems like the one you are suggesting, but I have now converted to a "skywriting" system wich I have invented -constructed and built a prototype.
My thoughts was , if you can't take your eyes from the heli, show the information ON the heli, or better, let the main blades "write" the info in the thin air :)
This prototype only shows actual RPM of the main rotor but could also send ACC voltage, temperatures and so on with some modifications.

Like this, showing main rotor RPM:

Image


The principle:

Image


I can send you schematics and code of the prototype if you want to build one.
//SonnyK

-If assembler looks blurry...... try 2 C# ;)

sonnyk
Posts: 245
Joined: 08 Nov 2005 19:25
Location: Sweden

#11 Post by sonnyk » 28 Dec 2008 16:18

another thing that i have tried is to have LED bars on the heli, showing the info on those, maybe 2 green 2 yellow and 1 red showing temp or volt.

very easy to build and small / light, perfect for small helis.
//SonnyK

-If assembler looks blurry...... try 2 C# ;)

MasterBlaster
Posts: 165
Joined: 25 Oct 2007 22:22
Location: Wuppertal, Germany, Earth... :-)
Contact:

#12 Post by MasterBlaster » 28 Dec 2008 16:49

sonnyk wrote:...Some considerations, your idea on sending telemetry data back to you is nice, but have in mind that is NOT easy to take your eyes from a RC heli when flying to look on a small display, you just don't have the time to do it.
Hi sonnyk,

yes you're right - it's only time for a very short look when i am flying... 8)

For the heli, i don't use the maximum of power that they can do - left and
right a small normal LED (3mm), only on "below behind" i have a red
luxeon, and at the upper tail - but the runs only 50ms for full power (short sparkling). The two ones use the full power of 7.4 LiPo Accu, the rest are
on 5v only (after a 78L05).

For the future, when i find time to develope it, i want also to receive the
incomming data from the helicopter on a SD-Card (flightdata writer), or
directly to the PC via parallel-port (SPI emulation). Only a idear... :lol:

As like as an "black Box"... :)
sonnyk wrote:...My thoughts was , if you can't take your eyes from the heli, show the information ON the heli, or better, let the main blades "write" the info in the thin air
Or a green laser diode with a power of 500mW writes it directly on the
ground - no, that was only a joke... :roll:

Your project is an interesting process - but i want to complete my project
first bevor i start additional developments. :lol:

Thanks a lot for your suggestions. What do you use for a color for the
rotor sheets, so that they are can reflecting the light of the led's enough? :shock:

Perhaps, i only use "mikroC" for all my projects... :D
so long,
MasterBlaster.

Using: EasyPIC4 HW. Rev. 1.03, LCD- & GLCD Display, NetWork and SD/MMC Adapter,
reg. MikroC Pro for PIC 2009, PIC 16F877A, 18F452 and 18F4685 with 8/20 MHz Xtal.

Acetronics
Posts: 715
Joined: 27 Dec 2006 14:33
Location: Le Tréport , FRANCE

#13 Post by Acetronics » 28 Dec 2008 16:57

MasterBlaster wrote:
Hi Alain,

thank you for your suggestions, but when i have to do it with the DS18x20
with more than one devices on 1-Wire, reading there ROM-ID's and using
this for selection if found a couple of them. It's seems like that the I-Button
example hasn't the same progress as like as i need for.
:? As your sensors stay at their places ... no need to check How much and which ID each time.
just read once the IDs, place them into EEPROM ... and call your 2 devices whenever you want.

I have such a program here ( PbP Written .... Yess ! ) which perfectly work like that ...

May be it's too simple ???
:lol:

Alain

sonnyk
Posts: 245
Joined: 08 Nov 2005 19:25
Location: Sweden

#14 Post by sonnyk » 28 Dec 2008 18:05

Masterblaster, if you have lights on your heli you want to control, I have built a small controller for that wich controls -POS lights -Anticollision lights -Landing lights.

What I meant with the led's in the earlier post was that you could make a "led bar" that is visible from the ground, that shows the values you want to see, like acc level and so on.

My "RC light" controller is based on an 12F629 or similar and drives the leds without any amplifier. Very few components.
You can control the lights with one free channel on your radio.

I can send you the schematics and code if you want.
//SonnyK

-If assembler looks blurry...... try 2 C# ;)

sonnyk
Posts: 245
Joined: 08 Nov 2005 19:25
Location: Sweden

#15 Post by sonnyk » 28 Dec 2008 18:06

Acetronics, yes I use my 1-wire devices that way, I have stored the ID's in the eeprom and call them one after each other.
//SonnyK

-If assembler looks blurry...... try 2 C# ;)

Post Reply

Return to “mikroC General”