DS18s20 commumicate with avr

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anybody help me to get a temperature data from the DS18s20 ucing gcc program. I'm using AVR atmega32

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you looked in the projects forum?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all I need to know the one wire bus protcol used to get a temperature from the DS18s20 to avr micro controller atmega32.If any body know that plz guid me

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there some reason you are ignoring John's advice? If you search "DS1820" in the project area it currently hits 8 projects. The one called "1 wire library" sounds pretty hopeful don't you think?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeabutt it's NOT EXACTLY what the OP wants to fit his homework. So we better do it for him.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi friends I'm beginner in the 1-wier and the Ds18s20 temperature sensor so I need to know how to write interface program for Ds1820.My recuirment is ATmega32 avr micro controller communicate and get correct temperature.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ganapathy we are NOT going to do the job for you. As we have pointed out above you have several bits of code to get you started.

If you can't handle that then you will need to wait another couple of years when you fully understand what's going on to do your project.

Sorry but that's life. :)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

enter ds18b20 in the search box on the left hand side and see what you get.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Visit ATMEL's Website atmel.com/avr/ -->Application Notes--> AVR318: Dallas 1-Wire master on tinyAVR and megaAVR devices

ATMEL--Heart Beat
Nothing Impossible

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How about just reading the datasheet for that part?

A wise man can learn more from a foolish question than a fool can learn from a wise answer. -Bruce Lee

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all i got a output from ds18s20 but its have some mistakes. that output is
ID: 104F8186010800A1 T: 0550 = 85.0øC.
like this. i was used only one sensor so i got like this is not change quick

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe the newer chip gives 8th degrees instead of half degrees, so the answer is 4 times too high?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If I recall correctly, 85C is the value that you can easily get if the DS sensor is not working/not wired correctly.

I also recall that the DS18S20 is a lot lot harder to use than the DS18B20 since meeting the correct parasitic power supply requirements is a bit tricky to understand and implement (but of course can de done)

Any chance you have a DS18B20 to hand?

PS Don't ask - I don't have any code for AVR/DS18x20 - all my experience is with another uController

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all, I got an ouput from the DS18s20
Thanks to all

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So now you can help the forum (and all those that come by here in the future) by posting your code...please :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MartinM57 wrote:
So now you can help the forum (and all those that come by here in the future) by posting your code...please :)

And tell us what problem you were having, and how you solved it!

It is not too hard to get the 1-wire interface working, but when I wrote my own 1-wire interface, I found I had to hand-tune some of the delays to account for various sources of overhead. I was hoping to make a general solution for all clock speeds in the software, but I am not too sure I was successful. I have not properly tested it.

-Tony

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I finished working on my digital thermometer last week. See subfolder AVR/firmware in the attached archive. :)

Attachment(s): 

-Angel Angelov
"Humans are stupid."
I'm probably working on a scratch-build rocket or on a PCB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MartinM57 wrote:

I also recall that the DS18S20 is a lot lot harder to use than the DS18B20 since meeting the correct parasitic power supply requirements is a bit tricky to understand and implement (but of course can de done)

Uhmm... The S hasn't anything to do with parasitic power , the S defaults to 9 bit precision , the B to 12.

But it's easy to get "1/16 deg" out of an S ... Just use the scratchpad..

Have a look here

http://www.siwawi.arubi.uni-kl.d...

/Bingo