CP2104
Rev. 1.1
13
6.1. Baud Rate Generation
The baud rate generator is very flexible, allowing the user to request any baud rate in the range from 300 bps to
2 Mbps. If the baud rate cannot be directly generated from the 48 MHz oscillator, the device will choose the closest
Equation 1. Clock Divider Calculation
Equation 2. Baud Rate Calculation
Most baud rates can be generated with an error of less than 1.0%. A general rule of thumb for the majority of UART
applications is to limit the baud rate error on both the transmitter and the receiver to no more than ±2%. The clock
divider value obtained in
Equation 1 is rounded to the nearest integer, which may produce an error source. Another
error source will be the 48 MHz oscillator, which is accurate to ±0.25%. Knowing the actual and requested baud
rates, the total baud rate error can be found using
Equation 3.Equation 3. Baud Rate Error Calculation
7. GPIO Pins
The CP2104 supports four user-configurable GPIO pins for status and control information. Each of these GPIO
pins are usable as inputs, open-drain outputs, or push-pull outputs. Three of these GPIO pins also have alternate
By default, all of the GPIO pins are configured as a GPIO input. The configuration of the pins is one-time
programmable for each device. The difference between an open-drain output and a push-pull output is when the
GPIO output is driven to logic high. A logic high, open-drain output pulls the pin to the VIO rail through an internal,
pull-up resistor. A logic high, push-pull output directly connects the pin to the VIO voltage. Open-drain outputs are
typically used when interfacing to logic at a higher voltage than the VIO pin. These pins can be safely pulled to the
higher, external voltage through an external pull-up resistor. The maximum external pull-up voltage is 5 V.
The speed of reading and writing the GPIO pins is subject to the timing of the USB bus. GPIO pins configured as
inputs or outputs are not recommended for real-time signaling.
More information regarding the configuration and usage of these pins can be found in “AN721: CP21xx Device
Customization Guide” and “AN223: Runtime GPIO Control for CP210x” available on the Silicon Labs website.
Table 11. GPIO Pin Alternate Functions
GPIO Pin
Alternate Function
GPIO.0
TX Toggle
GPIO.1
RX Toggle
GPIO.2
RS-485 Transceiver Control
Clock Divider
48 MHz
2
Prescale
Requested Baud Rate
----------------------------------------------------------------------------------------------------
=
Prescale
4 if Requested Baud Rate
365 bps
=
Prescale
1 if Requested Baud Rate
365 bps
=
Actual Baud Rate
48 MHz
2
Prescale
Clock Divider
-----------------------------------------------------------------------------
=
Prescale
4 if Requested Baud Rate
365 bps
=
Prescale
1 if Requested Baud Rate
365 bps
=
Baud Rate Error (%)
100
1
Actual Baud Rate
Requested Baud Rate
-----------------------------------------------------------
–
0.25%
=