Series to Parallel - Embedded

This is a discussion on Series to Parallel - Embedded ; Hi I need a way to convert an 8bit value from a serial port into an analog value. I am sending samples through the UART in my embedded linux board, at 19200 baud. i need to convert each sample into ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Series to Parallel

  1. Series to Parallel

    Hi

    I need a way to convert an 8bit value from a serial port into an
    analog value. I am sending samples through the UART in my embedded
    linux board, at 19200 baud. i need to convert each sample into an
    analog value.

    I read about a few serial to parallel converters, but none of them
    seem to be buffered, so we might have problems with synchronization.

    Could someone suggest a way?
    Thanks

    Sahasranaman

  2. Re: Series to Parallel

    sahasranaman wrote:
    > Hi
    >
    > I need a way to convert an 8bit value from a serial port into an
    > analog value. I am sending samples through the UART in my embedded
    > linux board, at 19200 baud. i need to convert each sample into an
    > analog value.
    >
    > I read about a few serial to parallel converters, but none of them
    > seem to be buffered, so we might have problems with synchronization.
    >
    > Could someone suggest a way?
    > Thanks
    >
    > Sahasranaman


    The serial data you are sending out is UART data, which cannot be used
    directly by any DAC devices. Basically, you should have some sort of
    microcontroller to interpret the UART data and drive a DAC.

    If that is beyond the scope of what you are happy developing, it's easy
    enough to drive a serial interface DAC directly if you have three or
    four pins on the board that you can control directly (a parallel port
    will do).

    Failing that, there are plenty of ready-made DAC boards available with
    all sorts of interfaces (serial, USB, PCI, etc.)

  3. Re: Series to Parallel

    On Mar 5, 4:10 pm, David Brown
    wrote:
    > sahasranaman wrote:
    > > Hi

    >
    > > I need a way to convert an 8bit value from a serial port into an
    > > analog value. I am sending samples through the UART in my embedded
    > > linux board, at 19200 baud. i need to convert each sample into an
    > > analog value.

    >
    > > I read about a few serial to parallel converters, but none of them
    > > seem to be buffered, so we might have problems with synchronization.

    >
    > > Could someone suggest a way?
    > > Thanks

    >
    > > Sahasranaman

    >
    > The serial data you are sending out is UART data, which cannot be used
    > directly by any DAC devices. Basically, you should have some sort of
    > microcontroller to interpret the UART data and drive a DAC.
    >
    > If that is beyond the scope of what you are happy developing, it's easy
    > enough to drive a serial interface DAC directly if you have three or
    > four pins on the board that you can control directly (a parallel port
    > will do).
    >
    > Failing that, there are plenty of ready-made DAC boards available with
    > all sorts of interfaces (serial, USB, PCI, etc.)


    Dear David,

    Thanks for your reply. I searched for a few serial interface DACs.
    problem is, they need a clock pulse for each bit transmitted too. Is
    there anyway to generate if from the serial signal? its 19200 baud.
    how does the UART controller does it while receiving data?

    Sahasranaman

  4. Re: Series to Parallel

    sahasranaman wrote:
    > On Mar 5, 4:10 pm, David Brown
    > wrote:
    >> sahasranaman wrote:
    >>> Hi
    >>> I need a way to convert an 8bit value from a serial port into an
    >>> analog value. I am sending samples through the UART in my embedded
    >>> linux board, at 19200 baud. i need to convert each sample into an
    >>> analog value.
    >>> I read about a few serial to parallel converters, but none of them
    >>> seem to be buffered, so we might have problems with synchronization.
    >>> Could someone suggest a way?
    >>> Thanks
    >>> Sahasranaman

    >> The serial data you are sending out is UART data, which cannot be used
    >> directly by any DAC devices. Basically, you should have some sort of
    >> microcontroller to interpret the UART data and drive a DAC.
    >>
    >> If that is beyond the scope of what you are happy developing, it's easy
    >> enough to drive a serial interface DAC directly if you have three or
    >> four pins on the board that you can control directly (a parallel port
    >> will do).
    >>
    >> Failing that, there are plenty of ready-made DAC boards available with
    >> all sorts of interfaces (serial, USB, PCI, etc.)

    >
    > Dear David,
    >
    > Thanks for your reply. I searched for a few serial interface DACs.
    > problem is, they need a clock pulse for each bit transmitted too. Is
    > there anyway to generate if from the serial signal? its 19200 baud.
    > how does the UART controller does it while receiving data?
    >
    > Sahasranaman

    You should have said you wanted an "async serial" DAC !

    19200 serial is async serial data, DACs are SPI serial data.

    Now you have enough to do your homework.


    donald

  5. Re: Series to Parallel

    On Wed, 05 Mar 2008 10:02:55 -0800, sahasranaman rearranged some electrons
    to say:

    > how
    > does the UART controller does it while receiving data?
    >
    > Sahasranaman


    The "A" in UART stands for asynchronous. The data is self-clocking based
    on the start bit.

    You should do your *own* schoolwork and not ask others to do it for you.

  6. Re: Series to Parallel

    On Mar 6, 7:39 am, david wrote:
    > On Wed, 05 Mar 2008 10:02:55 -0800, sahasranaman rearranged some electrons
    > to say:
    >
    > > how
    > > does the UART controller does it while receiving data?

    >
    > > Sahasranaman

    >
    > The "A" in UART stands for asynchronous. The data is self-clocking based
    > on the start bit.
    >
    > You should do your *own* schoolwork and not ask others to do it for you.


    Hey

    All I wanted was a push in the right direction. Anyway, I guess I've
    figured a way for doing this after reading your post. I never knew
    about self clocking signals.

    Thanks

  7. Re: Series to Parallel

    On Wed, 05 Mar 2008 00:28:45 -0800, sahasranaman wrote:

    > I need a way to convert an 8bit value from a serial port into an analog
    > value. I am sending samples through the UART in my embedded linux board,
    > at 19200 baud. i need to convert each sample into an analog value.


    You don't say what resolution and bandwidth you need. There is a clever
    hack if you just need a crude approximation: order your data values by
    the population count (number of '1' bits), and just run the TX into a
    suitable capacitor. If you put out the NUL character, you'll get one
    extreme value, and the 0xFF character will give you another one. This of
    course gives you only 8 distinct values (3-bit resolution). You can
    dither values to get more resolution, at the expense of bandwidth: e.g.
    repeatedly putting out 0xFF and 0xFE would output something half-way
    between the corresponding analog values for these two characters.



    --
    Przemek Klosowski, Ph.D.

  8. Re: Series to Parallel

    >I need a way to convert an 8bit value from a serial port into an
    >analog value. I am sending samples through the UART in my embedded
    >linux board, at 19200 baud. i need to convert each sample into an
    >analog value.


    I guess your microcontroller has no analog outputs?
    Assuming you're just transmitting the 8 bit value,
    I can think of 2 quick solutions

    1) use a stand alone UART such as an AY-3-1015
    (or something similar with a built in baud rate generator),
    hook the 8 bit parallel output directly to an
    8 bit D to A converter

    2) Use a single chip microcontroller such as an
    Atmel AVR or Microchip PIC
    with built-in UART and D/A converter.
    Write a tiny program to read the serial port
    and set the D/A converter.

+ Reply to Thread