Connect with us

Newbie: A/D -> RS-232 -> Computer -> RS-232 -> D/A

Discussion in 'General Electronics' started by Ralph Seguin, Jan 14, 2004.

Scroll to continue with content
  1. Ralph Seguin

    Ralph Seguin Guest

    I'm interested in learning electronics (have picked up a basic book,
    but open to recommendations).

    Anyhow, I'm basically looking for some help on the
    best/easiest/cheapest/fastest way of reading some analog values into
    the computer (via USB or RS-232 port), processing these values and
    then outputting a value via USB or RS-232 port to be output in analog.
    I'm also interested in outputting a value that represents a frequency
    to be generated by a timer chip.


    I've done some looking on Digikey and there are piles of A/D and D/A
    chips with serial interfaces on them. These are clearly not meant for
    RS-232 direct interfacing and I'm sure are meant for high speed serial

    I'm open to using PIC chips if necessary. If that is the route, then
    I need to find an inexpensive source for them.

    So, I guess I'm asking somebody/everybody to give me free
    ideas/designs that would normally cost mucho $$$ :)


  2. What I started reading your post I was hoping to see you mention the PIC (or
    any other MCU), which you did! That's because the MCU approach is one of the
    easiest and most flexible. You can get PICs with built-in A/D converters of
    up to 10 bits or resolution. As for D/A, if you're not too bothered with
    issues like precision, speed and ripple, you can use one of the built-in PWM
    outputs to generate an analogue voltage using a simple RC filter. The
    resolution of the h/w PWM modules on standard PICs goes up to 10 bits too,
    which matches the A/D nicely. If you want to go for a true D/A chip, there
    are plenty available. Choose a serial one (to save pins) and drive it from
    the PIC's pins directly. For the serial (RS-232) communication there are
    PICs with built-in USART modules that do it in hardware. I'd suggest the
    16F877A as a general purpose PIC with all of the above. If it's too big for
    you (40 pins) you can get the 28-pin version (16F876A). If you finally
    decide to go the PIC way, do a Google search for programmers, resources,
    etc. The available information is overwhelming. I personally use the ePIC
    programmer from As for source code, check out

    Once you build the data acquisition circuit and you can send/receive
    analogue signals, you can use the remaining PIC pins and code memory to do
    all sorts of fancy stuff like driving LCDs, controlling motors, etc. A nice
    beginner/intermediate project is to build a servo position control system
    with a motor coupled with a pot to provide the feedback signal.

    Good luck.

    Costas Vlachos Email:
    SPAM-TRAPPED: Please remove "-X-" before replying
  3. CWatters

    CWatters Guest

  4. The PIC 12F675 has a 4 channel AD, 8 pins, you can use a pin
    for serial out, internal flash memory, internal oscillator and cost
    about 2 $ in single quantities.
    2 power pins (+ and GND)
    4 input pins
    1 reset pin
    1 serial out

    To do the D/A spend an other 2 dollars and use the timer in that
    chip to generate a PWM signal, that you then lowpass with a simple RC.
    Rest as above.

    For that money buy 10 and start experimenting.

    Some (much) more expensive pics have rs232 port, some are 'self
    programable' via the rs232.

    You can also use a Philips PCF8591 on 3 pins (2 for sda, 1 for scl),
    it has 4 channel A/D and 1 channel DA 8 bits, but not true rs232,
    but i2c.
  5. Roger Gt

    Roger Gt Guest

    Go to

    It's $24.95 with all the software you need, and there are 4 10Bit channels.

    Least expensive I've found! I have three I use for DC power supply
  6. the Wiz

    the Wiz Guest

    Monitoring analog data via an RS232 connection is the easy part. DATAQ has a 4
    port, 10 bit, A/D device that gets its operating power from the serial
    connection to the PC and includes some software. They even include some VB
    source code.

    More about me:
    VB3/VB6/C/PowerBasic source code:
    Freeware for the Palm with NS Basic source code:
    Drivers for Pablo graphics tablet and JamCam cameras:
    johnecarter [email protected] mindspring com. Fix the obvious to reply by email.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day