Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3173
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Subject | Re: Do UART require data structure/format for serial communication? |
| Date | 2011-04-13 21:49 -0700 |
| Organization | > Bestiaria Support Staff < |
| References | <BANLkTimc-6hV8TO9OZivMYJ-O6HJfung1w@mail.gmail.com> <mailman.213.1302523106.9059.python-list@python.org> <4da344c6$0$10522$742ec2ed@news.sonic.net> <BANLkTinr9v03LCyo9EwviiSoKz=pFCtyMw@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.346.1302756603.9059.python-list@python.org> (permalink) |
On Wed, 13 Apr 2011 14:24:17 +0530, VGNU Linux <vgnulinux@gmail.com>
declaimed the following in gmane.comp.python.general:
> Actually I am trying to data communication between these 2 chips, but facing
> troubles in deciding a protocol to do the same.
> Do UART have any default protocols? For the moment I am trying to do it with
> Strings but not sure if that's the right solution.
The only absolute protocol is that UARTs use a start bit, some
preconfigured number of data bits, with or without a parity bit, and
some defined stop bit (1, 1.5, 2 bit times) [the infamous 8N1 -- 8-bit
word size, No parity, 1 stop bit]. Even handling transmission start/stop
may be moved into software level (ie; a pair of control CHARACTERS is
used to permit/inhibit transmission <ctrl-q> and <ctrl-s> I believe).
Oh, and bit rate...
All they do is take a parallel input and convert them to a serial
stream.
It IS common for them to accept additional pins between them for
permit/inhibit -- RTS/CTS and/or DSR/DTR (or something like that).
Anything else is purely by agreement in the software using the UART
for communication.
For example -- does the receiving device want JUST a <cr> to
terminate a command (for example), or does it need BOTH <cr><lf> to be
sent. And if it needs both, will PySerial convert <cr> to <cr><lf> (I'd
hope not, as it would make sending binary data rather difficult)
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar
Re: Do UART require data structure/format for serial communication? Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-04-11 13:57 +0200
Re: Do UART require data structure/format for serial communication? John Nagle <nagle@animats.com> - 2011-04-11 11:13 -0700
Re: Do UART require data structure/format for serial communication? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-04-13 21:49 -0700
csiph-web