View Full Version : Series to Parallel
sahasranaman
05-03-2008, 10:28 PM
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
David Brown
06-03-2008, 01:10 AM
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.)
sahasranaman
06-03-2008, 08:02 AM
On Mar 5, 4:10 pm, David Brown <da...@westcontrol.removethisbit.com>
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
donald
06-03-2008, 08:07 AM
sahasranaman wrote:
> On Mar 5, 4:10 pm, David Brown <da...@westcontrol.removethisbit.com>
> 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
david
06-03-2008, 04:39 PM
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.
sahasranaman
06-03-2008, 08:49 PM
On Mar 6, 7:39 am, david <n...@nospam.com> 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 :)
przemek klosowski
13-03-2008, 06:01 PM
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. <przemek.klosowski at gmail>
Jeff Jonas
28-03-2008, 11:06 PM
>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.
vBulletin® v3.8.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.