mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-09-27 04:13:07 +02:00
Update uart.rst (#2734)
* Update uart.rst * Update uart.rst --------- Co-authored-by: H. Árkosi Róbert <robreg@zsurob.hu>
This commit is contained in:
parent
2ac91126ff
commit
243ec7deaf
@ -30,12 +30,12 @@ In some cases only **TX** or **RX** exists as the device at the other end only a
|
|||||||
On the ESP32, this component uses the hardware UART units and is thus very accurate. On the ESP8266 however,
|
On the ESP32, this component uses the hardware UART units and is thus very accurate. On the ESP8266 however,
|
||||||
ESPHome has to use a software implementation as there are no other hardware UART units available other than the
|
ESPHome has to use a software implementation as there are no other hardware UART units available other than the
|
||||||
ones used for logging. Therefore the UART data on the ESP8266 can have occasional data glitches especially with
|
ones used for logging. Therefore the UART data on the ESP8266 can have occasional data glitches especially with
|
||||||
higher baud rates..
|
higher baud rates.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
From ESPHome 2021.8 the ``ESP8266SoftwareSerial`` UART ``write_byte`` function had the parity bit fixed to be correct
|
From ESPHome 2021.8 the ``ESP8266SoftwareSerial`` UART ``write_byte`` function had the parity bit fixed to be correct
|
||||||
for the data being sent. This could cause unexpected issues if you are using the Software Serial and have devices that
|
for the data being sent. This could cause unexpected issues if you are using the Software UART and have devices that
|
||||||
explicity check the parity. Most likely you will need to flip the ``parity`` flag in YAML.
|
explicity check the parity. Most likely you will need to flip the ``parity`` flag in YAML.
|
||||||
|
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ Configuration variables:
|
|||||||
Hardware UARTs
|
Hardware UARTs
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Whenever possible, ESPHome will use the hardware UART unit on the processor for fast and accurate communication.
|
Whenever possible, ESPHome will use the hardware UART unit on the ESP8266 for fast and accurate communication.
|
||||||
When the hardware UARTs are all occupied, ESPHome will fall back to a software implementation that may not
|
When the hardware UARTs are all occupied, ESPHome will fall back to a software implementation that may not
|
||||||
be accurate at higher baud rates.
|
be accurate at higher baud rates.
|
||||||
|
|
||||||
@ -74,12 +74,16 @@ be accurate at higher baud rates.
|
|||||||
logger and leave others available. If you have configured the logger to use a different hardware UART, the pins
|
logger and leave others available. If you have configured the logger to use a different hardware UART, the pins
|
||||||
used for hardware sharing change accordingly.
|
used for hardware sharing change accordingly.
|
||||||
|
|
||||||
The ESP32 has three UARTs. Any pair of GPIO pins can be used, as long as they support the proper output/input modes.
|
The ESP32 has three UARTs. ESP32 lite variant chips (ESP32-S3, ESP32-C3, ESP32-S2, etc) may have fewer UARTs (usually two). Any pair of GPIO pins can be used, as long as they support the proper output/input modes.
|
||||||
|
|
||||||
The ESP8266 has two UARTs; the second of which is TX-only. Only a limited set of pins can be used. ``UART0`` may
|
The ESP8266 has two UARTs; the second of which is TX-only. Only a limited set of pins can be used. ``UART0`` may
|
||||||
use either ``tx_pin: GPIO1`` and ``rx_pin: GPIO3``, or ``tx_pin: GPIO15`` and ``rx_pin: GPIO13``. ``UART1`` must
|
use either ``tx_pin: GPIO1`` and ``rx_pin: GPIO3``, or ``tx_pin: GPIO15`` and ``rx_pin: GPIO13``. ``UART1`` must
|
||||||
use ``tx_pin: GPIO2``. Any other combination of pins will result in use of a software UART.
|
use ``tx_pin: GPIO2``. Any other combination of pins will result in use of a software UART.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The the Software UART is only available on the ESP8266. It is not available on ESP32 and variants.
|
||||||
|
|
||||||
.. _uart-write_action:
|
.. _uart-write_action:
|
||||||
|
|
||||||
``uart.write`` Action
|
``uart.write`` Action
|
||||||
|
Loading…
Reference in New Issue
Block a user