Do you have a question? Post it now! No Registration Necessary
- sahasranaman
March 5, 2008, 8:28 am

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
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

Re: Series to Parallel

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.)

Re: Series to Parallel

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

Re: Series to Parallel

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. <przemek.klosowski at gmail>
Przemek Klosowski, Ph.D. <przemek.klosowski at gmail>

Re: Series to Parallel

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.
Site Timeline
- » Wear leveling NOR flashes
- — Next thread in » Embedded Linux
-
- » Embedded Job Position Open in Van Nuys.
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Quanta corrente potrà fornire?
- — The site's Newest Thread. Posted in » Electronics Hobby (Italian)
-