Searching \ for '[PIC]: 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/microchip/ios.htm?key=serial
Search entire site for: 'Serial baudrate conversion ideas?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Serial baudrate conversion ideas?'
2004\04\08@010317 by Herbert Graf

flavicon
face
{Quote hidden}

       Check out the Maxim MAX3100, it's an SPI UART. I'm considering it for a
project I have in mind that requires three UARTs. TTYL

----------------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

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

2004\04\08@023806 by Robert Rolf

picon face
You are not clear as to whether the PC is a slave or a master.
If the former, just get a PCI DMX card and be done with with.
http://www.pro-music-news.com/html/studio/e20323so.htm

Or a cheap serial card and change the crystal so that
115.2kbps becomes 250khz. 1.8432Mhz -> 4Mhz.
If you are lucky the embedded PC has a dedicated clock crystal
for the multifunction I/O chip, and you could change that.
A lot of MF chips start with 12 or 24mhz and can be programmed
to run with a higher starting baud rate divisor. (e.g. no
divide by 13 before the rate select mux.)

What's your time worth to build and debug a PIC baud rate changer?

Robert

Herbert Graf wrote:
{Quote hidden}

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

2004\04\08@024637 by David Duffy

flavicon
face
Herbert Graf wrote:

{Quote hidden}

It's not as simple as that. You have to generate the DMX other timing
as well. eg. Break, MAB, etc. The DMX stream is not just a series of
bytes @ 250KB. The timing is what syncs the receivers to the stream.
David...

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

2004\04\08@083046 by Roy J. Gromlich

picon face
For starters, I am not familiar with the DMX protocol.  I am, however, in
theprocess of coding for a PC design in wich I used a Maxim MAX3100 to create a
2nd RS232 port. The 3100 is NOT an easy chip to use - if I had it to do over
again, I wouldn't.

Since you indicate that you are TRANSMITTING only, the 3100 would probably work
for you without too much trouble, but if you ever want to RECEIVE it is a pain.

Just my experience with the chip speaking - your mileage may vary.

Roy J. Gromlich
{Quote hidden}

---------------------------------------------
This message was sent using PAdotNET WebMail.
             http://www.pa.net/

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

2004\04\08@085953 by Herbert Graf

flavicon
face
> For starters, I am not familiar with the DMX protocol.  I am, however, in
> theprocess of coding for a PC design in wich I used a Maxim
> MAX3100 to create a
> 2nd RS232 port. The 3100 is NOT an easy chip to use - if I had it
> to do over
> again, I wouldn't.
>
> Since you indicate that you are TRANSMITTING only, the 3100 would
> probably work
> for you without too much trouble, but if you ever want to RECEIVE
> it is a pain.
>
> Just my experience with the chip speaking - your mileage may vary.

       Can you elaborate on what makes it so painful for reception? I'm thinking
of using the chip in a future project. Thanks, TTYL

----------------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

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

2004\04\08@091305 by Eric Christensen

picon face
I've used the MAX3110 before without any problems.  Just quickly looking at
the parts, the 3110 seems to be a 3100 with built in level converters.  The
pic I used had an external interrupt, so I just wired the 3110's INT line to
INT0 on the PIC.  I configured the 3110 to throw an interrupt whenever there
was new data in the fifo and wrote an ISR that transfered one byte from the
3110 to the pic.  Seemed to work fine for me.

Eric




On Thu, 8 Apr 2004 08:59:08 -0400
Herbert Graf <spam_OUTmailinglist2TakeThisOuTspamFARCITE.NET> wrote:

{Quote hidden}

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

2004\04\08@110137 by Andrew Kilpatrick

flavicon
face
Hi,

I didn't want to be too verbose in my original post. Thanks
to everyone who has replied so far.

On Thu, Apr 08, 2004 at 12:35:38AM -0600, Robert Rolf wrote:
> You are not clear as to whether the PC is a slave or a master.
> If the former, just get a PCI DMX card and be done with with.
> http://www.pro-music-news.com/html/studio/e20323so.htm

Well, this is for a system where every dollar counts. Right now
time is plentiful, and money is not. Also, there is no room for
an add on card inside the enclosure, making a PCI card far too
large.

> Or a cheap serial card and change the crystal so that
> 115.2kbps becomes 250khz. 1.8432Mhz -> 4Mhz.
> If you are lucky the embedded PC has a dedicated clock crystal
> for the multifunction I/O chip, and you could change that.
> A lot of MF chips start with 12 or 24mhz and can be programmed
> to run with a higher starting baud rate divisor. (e.g. no
> divide by 13 before the rate select mux.)

I was wondering about maybe doing it just with the computer. I
read the datasheet for the National 16550, and it seems that with
some DMA action, it would be pretty efficient to send with the PC
directly. I've had pretty good luck with my super-io chip on the
motherboard in terms of low CPU overhead, at 115.2kbps anyway.


Andrew

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

2004\04\08@110344 by Andrew Kilpatrick

flavicon
face
On Thu, Apr 08, 2004 at 04:43:10PM +1000, David Duffy wrote:
{Quote hidden}

I have made a successful transmitter with a PIC that generates its
own data (from potentiometers) using the built-in USART. I simply turn
off the USART to generate the break, although some UARTs are apparently
capable of making breaks in hardware. A DMX protocol analyser though
thinks that my method is 100% fine with respect to timing.


Andrew

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

2004\04\08@135547 by William Chops Westfield

face picon face
On Thursday, Apr 8, 2004, at 08:01 US/Pacific, Andrew Kilpatrick wrote:

> I was wondering about maybe doing it just with the computer. I
> read the datasheet for the National 16550, and it seems that with
> some DMA action, it would be pretty efficient to send with the PC
> directly.

Is it really possible to use DMA with the async chip(set) in modern
PCs?  I don't recall that being possible originally (8250 uart, 8237
DMA), but
things are more integrated these days.  OTOH, it certainly has LOOKED
like the major 'advance' in UARTS has been deeper FIFOs, strongly
implying no DMA capability.  DMA of async data is quite a can of
worms...

You could look at old-style hardware uarts.  I made a newswire speed
conversion circuit with a couple of back-to-back 6402 uarts with
perhaps a one-shot and some BRG circuitry.  I don't recall whether the
6402 goes fast enough for your application, but it was a pretty trivial
circuit, and 6402s are still available from surplus dealers ($2.45 at
bgmicro.)

BillW

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

2004\04\08@170213 by Bob Axtell

face picon face
DMX512 is a theatrical lighting control system, and I designed one. Each
of the 512 bus addresses contains a light capable of being adjusted from
00 (off) to FF (full on) quickly. While the max bus address count is
512, in fact even the largest theatrical production has less than 150
addresses used. You will need to have a queue capable of storing the max
number of destination addresses expected. The PIC16F648 has 368
registers, so 256 can be reserved for temp storage, and 80 or so for
temporary storage. That should be plenty.

At 250KB there is NO space between outputs, so there are incredibly few
instructions between transmit bytes. In fact, your only hope is to stuff
two serial bytes at a time if possible in order to gain time to go
pickup the serial byte coming in.Your serial command has to be at least
two bytes, ADR+DATA+<CR>. If you have more than 256 addresses used, the
address expands to another byte. Since you have 3 bytes at 115KB and
are pumping 512 bytes at 250KB, the timing means that during an output
sweep you could conceivably receive 50 new values. Those values can be
directly jammed into their correct slot during a sweep as long as that
address has ALREADY been transmitted with the old value. If not, it has
to be stored for a good housekeeping time.

Use a F648 PIC at 20Mhz. Use TMR2 to generate an int at 115kb bit time
and use INT to trigger the falling edge of the START BIT, a standard
hardware UART. No external UART can be used, the overhead is just too
high. I've used the MAX3110 for something else but its too much overhead
for this app.

At the end of every sweep, there is time to do some housekeeping, a few mS.

I'd setup the input serial data as a circular queue, extracting and
stuffing as time becomes available.

It was a fun project. But it always makes you wish that you had more time..

It might be easier to use one of the 40mhz 18F parts.

--Bob


Eric Christensen wrote:
> I've used the MAX3110 before without any problems.  Just quickly looking at
> the parts, the 3110 seems to be a 3100 with built in level converters.  The
> pic I used had an external interrupt, so I just wired the 3110's INT line to
> INT0 on the PIC.  I configured the 3110 to throw an interrupt whenever there
> was new data in the fifo and wrote an ISR that transfered one byte from the
> 3110 to the pic.  Seemed to work fine for me.

--

 Replies: NOTE-Script, EXE,BAT and COM
    files will be rejected by server
             --------------
               Bob Axtell
       PIC Hardware & Firmware Dev
         http://beam.to/baxtell
             1-520-219-2363

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

2004\04\08@171505 by David Duffy

flavicon
face
Bob Axtell wrote:

> DMX512 is a theatrical lighting control system, and I designed one. Each
> of the 512 bus addresses contains a light capable of being adjusted from
> 00 (off) to FF (full on) quickly. While the max bus address count is
> 512, in fact even the largest theatrical production has less than 150
> addresses used.


Er, the larger theatrical productions use several universes of DMX,
each having 512 channels. But yes, the average small theatre does
not usually need more than 48 - 80 channels.
David...

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

2004\04\08@172119 by David Duffy

flavicon
face
Andrew Kilpatrick wrote:

>On Thu, Apr 08, 2004 at 04:43:10PM +1000, David Duffy wrote:
>
>
>>It's not as simple as that. You have to generate the DMX other timing
>>as well. eg. Break, MAB, etc. The DMX stream is not just a series of
>>bytes @ 250KB. The timing is what syncs the receivers to the stream.
>>David...
>>
>>
>
>I have made a successful transmitter with a PIC that generates its
>own data (from potentiometers) using the built-in USART. I simply turn
>off the USART to generate the break, although some UARTs are apparently
>capable of making breaks in hardware. A DMX protocol analyser though
>thinks that my method is 100% fine with respect to timing.
>
>

OK, but then it's not a serial baud rate converter is it. What you're
really making is a DMX dongle.You want to accept commands @
say 115,200 and spit out continuous DMX data. Sort of like dual
port RAM - the commands poke values into it and a background
task uses the same RAM for the DMX values to transmit.
David...

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

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