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

Reply to
sahasranaman
Loading thread data ...

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

Reply to
David Brown

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

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

Reply to
donald

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

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.

Reply to
david

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

Reply to
sahasranaman

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.
Reply to
przemek klosowski

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

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.