]> sigrok.org Git - libsigrokdecode.git/blob - decoders/uart/__init__.py
d40a7c9cd8f9edd5f3c7db528439c3b5d369f541
[libsigrokdecode.git] / decoders / uart / __init__.py
1 ##
2 ## This file is part of the libsigrokdecode project.
3 ##
4 ## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
10 ##
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, write to the Free Software
18 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19 ##
20
21 '''
22 UART (Universal Asynchronous Receiver Transmitter) is a simple serial
23 communication protocol which allows two devices to talk to each other.
24
25 This decoder should work on all "UART-like" async protocols with one
26 start bit (0), 5-9 databits, an (optional) parity bit, and one or more
27 stop bits (1), in this order.
28
29 It can be run on one signal line (RX or TX) only, or on two lines (RX + TX).
30
31 There are various standards for the physical layer specification of the
32 signals, including RS232, (TTL) UART, RS485, and others. However, the logic
33 level of the respective pins is only relevant when acquiring the data via
34 a logic analyzer (you have to select the correct logic analyzer and/or
35 the correct place where to probe). Once the data is in digital form and
36 matches the "UART" description above, this protocol decoder can work with
37 it though, no matter whether the source was on TTL UART levels, or RS232,
38 or others.
39 '''
40
41 from .pd import *