EmbeddedRelated.com
Forums

20 bit UART for 5912OSK

Started by Unknown January 13, 2006
Greetings, I am having some problems with the UART protocol. To my
limited knowledge, I know that the UART is capable of handling more
than the usual 8 data bits. I would need the OMAP to receive 20 bits of
data from an external device. My guess is the UART is the most suitable
protocol to handle this. However, being 20 data bits, how can I
configure the UART code to handle this? I know I need to insert a start
and stop bit to make it into a frame but I am not well versed in ANSI
C. Any suggestions? Any kind of help would be appreciated. Thanks for
looking.

Regards
Lincoln

If you need to ask this question you shouldn't be playing with products as complex as 
OMAP.

The UART bit patterns are 7,8 or 9 bits maximum. To transmit longer objects you'll 
need to encapsulate them into a frame of multiple bytes.

-Andrew M

<sillycar@gmail.com> wrote in message 
news:1137138406.204069.185890@g44g2000cwa.googlegroups.com...
> Greetings, I am having some problems with the UART protocol. To my > limited knowledge, I know that the UART is capable of handling more > than the usual 8 data bits. I would need the OMAP to receive 20 bits of > data from an external device. My guess is the UART is the most suitable > protocol to handle this. However, being 20 data bits, how can I > configure the UART code to handle this? I know I need to insert a start > and stop bit to make it into a frame but I am not well versed in ANSI > C. Any suggestions? Any kind of help would be appreciated. Thanks for > looking. > > Regards > Lincoln >
*** top-posting fixed ***

Andrew M wrote:
> <sillycar@gmail.com> wrote in message > >> Greetings, I am having some problems with the UART protocol. >> To my limited knowledge, I know that the UART is capable of >> handling more than the usual 8 data bits. I would need the >> OMAP to receive 20 bits of data from an external device. My >> guess is the UART is the most suitable protocol to handle >> this. However, being 20 data bits, how can I configure the >> UART code to handle this? I know I need to insert a start and >> stop bit to make it into a frame but I am not well versed in >> ANSI C. Any suggestions? Any kind of help would be >> appreciated. Thanks for looking. > > If you need to ask this question you shouldn't be playing with > products as complex as OMAP. > > The UART bit patterns are 7,8 or 9 bits maximum. To transmit > longer objects you'll need to encapsulate them into a frame of > multiple bytes.
Please don't top-post. I fixed this one. The reason for the UART bit length limitation is that both ends have to agree on the actual baud rate. The result must sample the final stop bit correctly. For 10 total bits (8 data, plus start and stop) this means the frequencies must agree within at least 5%, assuming exact accuracy in locating the start bit. Things only get worse from there. For 20 or so bits that number is about 2%, and the initial sampling accuracy will probably not let it work at all. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson More details at: <http://cfaj.freeshell.org/google/>
"Chuck F. " <cbfalconer@yahoo.com> wrote in message
news:0_ednW1M_q-C4lreRVn-vA@maineline.net...
> *** top-posting fixed *** > > Andrew M wrote: > > <sillycar@gmail.com> wrote in message > > > >> Greetings, I am having some problems with the UART protocol. > >> To my limited knowledge, I know that the UART is capable of > >> handling more than the usual 8 data bits. I would need the > >> OMAP to receive 20 bits of data from an external device. My > >> guess is the UART is the most suitable protocol to handle > >> this. However, being 20 data bits, how can I configure the > >> UART code to handle this? I know I need to insert a start and > >> stop bit to make it into a frame but I am not well versed in > >> ANSI C. Any suggestions? Any kind of help would be > >> appreciated. Thanks for looking. > > > > If you need to ask this question you shouldn't be playing with > > products as complex as OMAP. > > > > The UART bit patterns are 7,8 or 9 bits maximum. To transmit > > longer objects you'll need to encapsulate them into a frame of > > multiple bytes. > > Please don't top-post. I fixed this one. > > The reason for the UART bit length limitation is that both ends > have to agree on the actual baud rate. The result must sample the > final stop bit correctly. For 10 total bits (8 data, plus start > and stop) this means the frequencies must agree within at least 5%, > assuming exact accuracy in locating the start bit. Things only get > worse from there. For 20 or so bits that number is about 2%, and > the initial sampling accuracy will probably not let it work at all. >
Chuck, I've seen asynchronous message lengths up to 31 bits that worked just fine using standard baud rate generator chips and crystals. All the ones I've worked with had three bit sync codes which functioned just like a start bit. However, it can't be done with standard asynchronous UART hardware since those insert start and stop bits automatically every 5-9 bits. -- James T. White
James T. White wrote:
> "Chuck F. " <cbfalconer@yahoo.com> wrote in message >> Andrew M wrote: >>> <sillycar@gmail.com> wrote in message >>> >>>> Greetings, I am having some problems with the UART >>>> protocol. To my limited knowledge, I know that the UART is >>>> capable of handling more than the usual 8 data bits. I >>>> would need the OMAP to receive 20 bits of data from an >>>> external device. My guess is the UART is the most suitable >>>> protocol to handle this. However, being 20 data bits, how >>>> can I configure the UART code to handle this? I know I >>>> need to insert a start and stop bit to make it into a >>>> frame but I am not well versed in ANSI C. Any suggestions? >>>> Any kind of help would be appreciated. Thanks for looking. >>> >>> If you need to ask this question you shouldn't be playing >>> with products as complex as OMAP. >>> >>> The UART bit patterns are 7,8 or 9 bits maximum. To transmit >>> longer objects you'll need to encapsulate them into a frame >>> of multiple bytes. >> >> The reason for the UART bit length limitation is that both >> ends have to agree on the actual baud rate. The result must >> sample the final stop bit correctly. For 10 total bits (8 >> data, plus start and stop) this means the frequencies must >> agree within at least 5%, assuming exact accuracy in locating >> the start bit. Things only get worse from there. For 20 or >> so bits that number is about 2%, and the initial sampling >> accuracy will probably not let it work at all. > > I've seen asynchronous message lengths up to 31 bits that worked > just fine using standard baud rate generator chips and crystals. > All the ones I've worked with had three bit sync codes which > functioned just like a start bit. However, it can't be done > with standard asynchronous UART hardware since those insert > start and stop bits automatically every 5-9 bits.
You are talking about some other protocol than a UART, which has 1 start bit, data bits, and 1 or more stop-bits. They use an agreed clock frequency, but have no restrictions on clock phase, or the actual length of the stop period. That phasing/stop period is important in determining the frequency tolerance. That phasing problem is why most UARTs use a 16x clock signal. They need at least a 2x signal, and that can be very hairy. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson More details at: <http://cfaj.freeshell.org/google/>
<sillycar@gmail.com> schreef in bericht 
news:1137138406.204069.185890@g44g2000cwa.googlegroups.com...
> Greetings, I am having some problems with the UART protocol. To my > limited knowledge, I know that the UART is capable of handling more > than the usual 8 data bits. I would need the OMAP to receive 20 bits of > data from an external device. My guess is the UART is the most suitable > protocol to handle this. However, being 20 data bits, how can I > configure the UART code to handle this? I know I need to insert a start > and stop bit to make it into a frame but I am not well versed in ANSI > C. Any suggestions? Any kind of help would be appreciated. Thanks for > looking.
If performance is not too important, consider implementing serial comm's on a general purpose I/O pin. KA
Hi Chuck, I gather from your post that it is not advisable to use the
UART protocol then? Thanks for the reply.

I don't have a choice. My project requires me to use the OMAP. Thanks
for the reply.

Lincoln

Sillycar wrote:
> > Hi Chuck, I gather from your post that it is not advisable to use the > UART protocol then? Thanks for the reply.
I participate in 25 or so Usenet newsgroups and mailing lists, so I don't remember much of what I posted. That is why it is essential to include adequate context. Before posting again, please read the instructions in my sig below, and especially read the referenced URL. Google is NOT Usenet, it is simply a broken interface to it. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson More details at: <http://cfaj.freeshell.org/google/>
Chuck F.  wrote:

> *** top-posting fixed *** > > Andrew M wrote: > > <sillycar@gmail.com> wrote in message > > > >> Greetings, I am having some problems with the UART protocol. > >> To my limited knowledge, I know that the UART is capable of > >> handling more than the usual 8 data bits. I would need the > >> OMAP to receive 20 bits of data from an external device. My > >> guess is the UART is the most suitable protocol to handle > >> this. However, being 20 data bits, how can I configure the > >> UART code to handle this? I know I need to insert a start and > >> stop bit to make it into a frame but I am not well versed in > >> ANSI C. Any suggestions? Any kind of help would be > >> appreciated. Thanks for looking. > > > > If you need to ask this question you shouldn't be playing with > > products as complex as OMAP. > > > > The UART bit patterns are 7,8 or 9 bits maximum. To transmit > > longer objects you'll need to encapsulate them into a frame of > > multiple bytes. > > Please don't top-post. I fixed this one. > > The reason for the UART bit length limitation is that both ends > have to agree on the actual baud rate. The result must sample the > final stop bit correctly. For 10 total bits (8 data, plus start > and stop) this means the frequencies must agree within at least 5%, > assuming exact accuracy in locating the start bit. Things only get > worse from there. For 20 or so bits that number is about 2%, and > the initial sampling accuracy will probably not let it work at all. > > -- > "If you want to post a followup via groups.google.com, don't use > the broken "Reply" link at the bottom of the article. Click on > "show options" at the top of the article, then click on the > "Reply" at the bottom of the article headers." - Keith Thompson > More details at: <http://cfaj.freeshell.org/google/>
Hi Chuck, I gather from your post that it is not advisable to use the UART protocol then? Thanks for the reply.