Need guidence for programming a DS1821C+


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    May 2008
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Re: Need guidence for programming a DS1821C+

    Thanks again, I think that will come in handy when I work at regaining access to the DS1821.
    I had ordered some DS1821 and they arrived today. I wrote some code to query and write to the DS1821 setting and reading the various registers and finally put it into thermostat mode. It works. Mostly.
    The issue I'm having now is the logic hi / low levels don't seem to match the spec in the data sheet, unless I don't understand it, which is most likely.
    I'm reading that the DS1821 can sink 4mA minimum. Yet in thermostat mode with a logic 0 on the DQ pin I can drive it to a logic 1 by measuring the voltage on the DQ Pin if I reference Vdd (+5 volts). In other words Red lead on DQ (PORTA.0) Black lead on +5 volts forces a logic high and reads -3.7232 VDC (avg) which is of course inverted because of the reversed leads. My meter is a Fluke 189 with 10M ohms impedance, I figure I'm loading the circuit with +500 nano amps and forcing it to a logic 1. I tried my other Fluke meter with the same results. Tried 1 meg ohm pull up and pull down resistors but the DS1821 seems to have no drive, it can't overcome the 1 Meg Ohm resistor either high or low. Even TOUCHING the free end of a 1 meg ohm resistor plugged into the DQ line of the DS1821 forces it to a logic high.
    It does produce high and low states to PORTA.0 on the PIC as it's supposed to but I wasn't planning on using a PIC in the final circuit, I was going to drive a MOSFET with the DS1821 and wanted a pull down resistor on the gate but it seems even a 10 Meg Ohm is not an option. What's the solution with such small signals?
    Data sheet is HERE (DS1821) if anyone wants to have a look.
    TIA
    Neo

  2. #2
    Join Date
    May 2008
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Re: Need guidence for programming a DS1821C+

    Once again, problem solved. Operator error. I'll blame it on working 16 hour days and bread-boarding at 1:00 am. Lets just say the power supply was inadequate. I'm getting very good logic states now. In the future I'll try to sleep on a problem before asking about it.
    Neo

Similar Threads

  1. need help programming
    By chris000 in forum General
    Replies: 1
    Last Post: - 20th May 2009, 05:18
  2. new to PIC programming could really do with some help
    By karenhornby in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th March 2008, 14:03
  3. I2C programming
    By goku24m in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th October 2007, 03:12
  4. gps programming
    By chuckad in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 20th June 2006, 01:02
  5. New to PIC Programming
    By Keiou in forum General
    Replies: 3
    Last Post: - 29th October 2003, 19:13

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts