Searching \ for 'Serial baudrate conversion ideas?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/serials.htm?key=serial
Search entire site for: 'Serial baudrate conversion ideas?'.

Truncated match.
PICList Thread
'Serial baudrate conversion ideas?'
2004\04\08@005907 by Wouter van Ooijen

face picon face
> The crux is that I am interfacing it with an embedded PC using the
> RS-232 port which runs at 115.2kbps. Of course there is a bottleneck,
> but it's ok because the data being sent is generated less often then
> what would be needed to max out the DMX output.
>
> Here are my current thoughts on a solution:
>
> - 2 PICs connected together with either parallel or I2C
> - a PIC with 2 UARTs (but the only ones are 64TQFP, not nice
> to solder)
> - a PIC controlling a 16550 UART

DMX is send only, so why not use the hardware UART for the PC
communication, and generate the DMX asynch in software? Check the UART
between each sent character and buffer anything received, processes it
later during the gap between DMX frames. Now you just need a PIC with at
least 512 bytes RAM to buffer the DMX data :)

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\08@105513 by Andrew Kilpatrick

flavicon
face
> DMX is send only, so why not use the hardware UART for the PC
> communication, and generate the DMX asynch in software? Check the UART
> between each sent character and buffer anything received, processes it
> later during the gap between DMX frames. Now you just need a PIC with at
> least 512 bytes RAM to buffer the DMX data :)
>
> Wouter van Ooijen

I would generate the DMX in software, but at 250kbps, a bit is only
4uS, which doesn't leave much time to do anything else.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\08@140004 by Mike Hawkshaw

flavicon
face
Andrew,

I think some of the usb to rs232 convererts go this quick, but I don't know
if they will do what you want.

Cheers.....Mike.

{Original Message removed}

2004\04\08@162438 by Wouter van Ooijen

face picon face
> I would generate the DMX in software, but at 250kbps, a bit is only
> 4uS, which doesn't leave much time to do anything else.

Using an 18F at 40 Mhz that is 40 instructions, not much but probably
doable. Using an SX at 75 MHz it is 300 instructions :) Or maybe mis-use
the SPI port?

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\09@094812 by Bob Ammerman

picon face
You don't need much time to do anything else.

However, you are going to have a problem because 115,200 baud and 250,000
baud don't have any helpful common factors. It will be tricky to find a
crystal frequency that will let you handle both with good accuracy.

Now, to use the built-in UART for the 115,200 the FOsc must be N*4*16*115200

This gives valid FOsc values of:

N    FOsc
1    7,372,800
2    14,745,600
3    22,118,400
4    29,491,200
5    36,864,000

At the same time, we need FOsc to be M*4*250,000 for bit-banging the DMX.
This gives values of FOsc:

M    FOsc
1    1,000,000
2    2,000,000
3    3,000,000
4    5,000,000
etc.

So, assuming we used a 36,864,000 FOsc (i.e.; 18F with 4xDLL on a 9,216,000
Hz crystal). Now if we use M=37 for the DMX side, we get an actual DMX baud
rate of 36,864,000 / (4*M) = 249081. This is an error of -0.37%, which isn't
too bad at all. In this case, you will have 37 instruction times to generate
each DMX bit, which ought to be plenty.

Of course, finding a 9,216,000 Hz crystal might be a little tricky.

Bob Ammerman
RAm Systems


{Original Message removed}

2004\04\09@102342 by Matt Pobursky

flavicon
face
9.216 MHz is actually a fairly standard crystal frequency, I've even
used them before.

A quick search on Digikey's website shows several available and "in-
stock".

Matt Pobursky
Maximum Performance Systems

On Fri, 9 Apr 2004 09:47:27 -0400, Bob Ammerman wrote:
> So, assuming we used a 36,864,000 FOsc (i.e.; 18F with 4xDLL on a 9,216,000
> Hz crystal). Now if we use M=37 for the DMX side, we get an actual DMX baud
> rate of 36,864,000 / (4*M) = 249081. This is an error of -0.37%, which isn't
> too bad at all. In this case, you will have 37 instruction times to generate
> each DMX bit, which ought to be plenty.
>
> Of course, finding a 9,216,000 Hz crystal might be a little tricky.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...