Shop OBEX P1 Docs P2 Docs Learn Events
DS2450 ADC — Parallax Forums

DS2450 ADC

Hi,
Can someone supply working Basic code for the BS2 one-wire setup of the DS2450 Analog to Digital Converter? All I want is for the four channels to be ADCs, analog range input 5.1 VDC, 12-bits or conversion, and no alarms.

Everything I tried sets the ADC to 2.55 VDC.

Discovery

Comments

  • Which BS2 chip do you have?

    This code is for the BS2P with the built-in Onewire commands:

    http://forums.parallax.com/discussion/104391/dallas-ds2450-sample-code
  • It is the BS2p.

    Discovery
  • Publison,
    Have you actually run this code and verified that channel A and channel D can handle a 5 volt input?

    I have this data sheet and modified the code since I did not want alarms and wanted only four analog inputs and could not get the analog inputs to convert a voltage greater than 2.55 vdc.

    Discovery
  • I have a BS2P but do not have a DS2450.
  • Aw...that is a problem. I am hoping that someone has actually wired up a DS2450 via the one-wire to a BS2p and setup the device for four channels of ADC.

    Discovery
  • tomcrawfordtomcrawford Posts: 1,126
    edited 2017-06-12 17:41
    I have the posted code running on a BS2px (Channel D only). It reports analog voltage of 5000 mv to 40 mv. It does *not* turn the LEDs on (don't know why) but otherwise does just what the poster said it would. I will study the data sheet and see if I can get additional channels working.

    Attached is the code as a file. It was posted before the Great Forum Change and required a lot of manual deformatting.

    Here is a picture of my setup (BS-2 PDB).

    Edit: I had the LEDs returned to ground. The DS2450 outputs are open collector; have to be returned to Vdd. The program does exactly what the poster said it does. Endedit
    2048 x 1536 - 725K
  • Well, actually, the program doesn't really do what is claimed. It follows the USAGE EXAMPLE from the data sheet, which never explains how to interpret the data.

    It displays the voltage as twice what is on the input pin.

    I was never able to get anything to show up on the high order byte.

    Attached is a program the sets up all four channels, supposedly for 12-bit resolution and 5V full scale. But it ain't.
  • Hi Tomcrawford,

    By any chance do you have contacts at Maxim who might be able to shed some light on this problem. I have lots of these DS2450 devices and really would like to use them only as four channel ADCs with 12-bit conversion. Actually I use them as four channel digital outputs in my control systems as well as four channel ADCs. So far, I never encountered a problem using them as four channel DOs.

    Discovery
  • Sorry, don't know anyone at Maxim anymore. I left San Jose almost 20 years ago.

    I really thought that program was working, too. But no.
  • Rats...

    Many years ago, I developed a unit for stripping out seismic data from a Texas Instruments DSF-9 data acquisition system and send the data to a newly developed RISC chip...actually about eight of them...programmed by an X-employee of Texas Instruments who was on the RISC development team. He knew of a method of reprogramming the RISC so that it could utilize some features not available on the commercial RISC chip. With that knowledge he was able to process all the seismic data on a portable computer in real time and display that data at the data acquisition site. It did the work of a big Sigma-7 main frame computer.

    It is too bad that a Dallas Semiconductor X-employee who was on the design team of the DS2450 isn't available to find a way to make the chip work.

    Discovery
Sign In or Register to comment.