CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

ds18s20 with active pull-up and active pull-down

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
pom



Joined: 25 Nov 2004
Posts: 30
Location: Germany

View user's profile Send private message

ds18s20 with active pull-up and active pull-down
PostPosted: Wed Aug 17, 2005 6:32 am     Reply with quote

Hello,

I already worked with an one-wire-sensor of Dallas. But now I wanted to use a longer wire to connect the ds18s20 and so I used the another circuit, which works with an active pull-up and an active pull-down. So the dallas is connected to the PIC18F258 with three wires.

My problem is tht I don't know how to program it. The only informations that I found were for the other circuit. But that is just with one pin connected to the pic, mine is connected with three. So I can't choose a ONE_WIRE_PIN.

Has someone already worked with such a circuit? Do I have to set two pins to a special signal and use the normal one-wire-programm to the third?

I don't know what to do and I am very angry to myself for changing the way of working with ds18s20. I would be very thankful for your tipps.

Have a nice week, pom

edit: It was not AppNote 244 as I said. I was wrong.
pom



Joined: 25 Nov 2004
Posts: 30
Location: Germany

View user's profile Send private message

PostPosted: Mon Aug 22, 2005 1:39 am     Reply with quote

I edited the text but the post was not set to the top of the frum, so I have to lift it by myself.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Aug 22, 2005 3:11 am     Reply with quote

Sounds interesting these active pull-ups, do you have a schematic or reference to documentation for this?
pom



Joined: 25 Nov 2004
Posts: 30
Location: Germany

View user's profile Send private message

PostPosted: Mon Aug 22, 2005 6:03 am     Reply with quote

hello,

the circuit for the active pull-up is described in the application note 132 of maxim. Look at figure number 8. The connection between ds1820 and PIC can be about 600 metres long.

But I don't know, how to program.

Bye, pom

AN132: http://pdfserv.maxim-ic.com/en/an/app132.pdf
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Mon Aug 22, 2005 8:12 am     Reply with quote

Well it's called one wire but it always needs at least two wires. One is the ground and the other the so called one wire. The devices hung off the one wire will need to parasitically extract power from the one wire unless they are fed by a third wire . Devices connecting to the wire are "wire ored " to each other. Any device bringing the one wire to ground will succeed in doing so even if another device is trying to go high. The issue the circuit you are using is solving is how fast the line can be returned to high....this is needed to continue charging other devices and also to gain speed in transmitting data. The circuit also relieves the PIC of having to sink the current when pulling low.The preferred connection should never drive the line high.....this can be done by using an external switch such as a FET or via an open drain pin on the PIC. An alternative to the open drain is to use an ordinary digital PIN on the PIC and drive low with an output of 0 and go high by setting the pin to float and letting a pull up get the line high.
You'll need to look at the code that writes to the TOUCH-PIN. Where there is a call to output_low replace it with your output low code that will activate the APD line. Where the touch code uses output_float you'll need to replace it with code that will activate the APU line. The reads to the touch pins should be OK.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group