Hi,
I would like to know how many UART & I2C interfaces can I control at the same time?
I want to use 4 UARTs and 5 I2Cs simultaneously.
Best regards,
Roei Dadush
-
- Posts: 1074
- Joined: Tue Oct 06, 2020 8:07 pm
Re: Raspberry Pi 4B interfaces
you do know I2C has addresses. up to ~100 devices can be connected to a single I2C as long as their addresses differ.
(7 bit addressing... but some are reserved)
https://learn.adafruit.com/adafruits-ra ... guring-i2c
as for UARTs, i found this:
https://pinout.xyz/pinout/uart#:~:text= ... 0your%20Pi.
(7 bit addressing... but some are reserved)
https://learn.adafruit.com/adafruits-ra ... guring-i2c
as for UARTs, i found this:
https://pinout.xyz/pinout/uart#:~:text= ... 0your%20Pi.
i had a Trash-80 model 1 (circa 1980). upgrading from 4k to 16k of RAM, i thought "i'll never use this much RAM".
Now i have a computer with a million times that much memory. And i keep running out of it.
Not the computer....ME.
Now i have a computer with a million times that much memory. And i keep running out of it.
Not the computer....ME.
Re: Raspberry Pi 4B interfaces
What speed and controls do you want on the UART?
By default, the Pi uses TX/RX and GND - for other signal handling (RTS/CTS etc) you really need to go external chips often HAT or USB based.
The other thing to think about is voltage - the Pi only like 3.3v where as serial can be all over the place.
By default, the Pi uses TX/RX and GND - for other signal handling (RTS/CTS etc) you really need to go external chips often HAT or USB based.
The other thing to think about is voltage - the Pi only like 3.3v where as serial can be all over the place.
Re: Raspberry Pi 4B interfaces
That's not entirely correct.
The device tree overlays for uart2 through uart5 support CTS and RTS if enabled in config.txt. They're 3.3v only same as the RX and TX pins. Details in /boot/overlays/README
To use uart2 you'll need to disable both the HAT EEPROM probe and the PoE HAT fan control.
AIUI it is not possible to use both of uart0 and uart1 as GPIOs 32, 33, 36, 37, 40, and 41 are not routed to the GPIO header one oof these UARTS can be routed to GPIO 14 and 15 by default the other goes to the bluetooth controller. Disabling bluetooth won't help.
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
-
- Posts: 822
- Joined: Fri Aug 25, 2017 2:58 pm
- Location: Blackstone River Valley, MA, USA
Re: Raspberry Pi 4B interfaces
The are only two other voltage level systems that most users will ever need to consider, TTL 5V(e.g. Arduino) and TIA-232 (+/-3 to +/- 15). For both there are many component, chip, and PCB level solutions available off the shelf that will interface the RasPI's +3.3V pins to these other levels.
Here's two examples of PCB level solutions:
3.3V to 5V https://www.sparkfun.com/products/12009
TIA-232 https://www.mikroe.com/max3232-board
- FTrevorGowen
- Forum Moderator
- Posts: 7148
- Joined: Mon Mar 04, 2013 6:12 pm
- Location: Bristol, U.K.
Re: Raspberry Pi 4B interfaces
and, maybe, the similar, somewhat historical, RS232 variations: FWIW, some (old/ancient) notes here: https://www.cpmspectrepi.uk/rs232/rs232.htmPaul Hutch wrote: ↑Thu Mar 23, 2023 7:44 pmThe are only two other voltage level systems that most users will ever need to consider, TTL 5V(e.g. Arduino) and TIA-232 (+/-3 to +/- 15). For both there are many component, chip, and PCB level solutions available off the shelf that will interface the RasPI's +3.3V pins to these other levels.
Here's two examples of PCB level solutions:
3.3V to 5V https://www.sparkfun.com/products/12009
TIA-232 https://www.mikroe.com/max3232-board
and a couple of pi interfaced examples here:
https://www.cpmspectrepi.uk/raspberry_p ... apter.html (connected device sadly no longer "with us")
https://www.cpmspectrepi.uk/raspberry_p ... 000zc.html (somewhat unusual "protocol" but still "viable")
Trev.
Begining to test Bullseye on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B, B+, and a A+) and Pi's with cameras with Buster on the P3B+, some P4B's & P400. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm
Re: Raspberry Pi 4B interfaces
The problem I hit was getting Python to use this on uart2 - its possible that I had the config.txt or PySerial wrong (rtscts control in the class) or it is not fully supported at the far end but as soon as I moved to external hardware then my issues cleared up.
Actually you need to cope with ±25V (open circuit) - I've seen +20 on printers before today and ±10 on serial extendersPaul Hutch wrote:The are only two other voltage level systems that most users will ever need to consider, TTL 5V(e.g. Arduino) and TIA-232 (+/-3 to +/- 15)...

I've also seen a telephone line blow up a serial port but the guilty party never wants to talk about it (still not worked out why the modem was removed)

-
- Posts: 822
- Joined: Fri Aug 25, 2017 2:58 pm
- Location: Blackstone River Valley, MA, USA
-
- Posts: 822
- Joined: Fri Aug 25, 2017 2:58 pm
- Location: Blackstone River Valley, MA, USA
Re: Raspberry Pi 4B interfaces
RS-232 is a very old subset of TIA-232.FTrevorGowen wrote: ↑Thu Mar 23, 2023 8:01 pmand, maybe, the similar, somewhat historical, RS232 variations: FWIW, some (old/ancient) notes here: https://www.cpmspectrepi.uk/rs232/rs232.htm
and a couple of pi interfaced examples here:
https://www.cpmspectrepi.uk/raspberry_p ... apter.html (connected device sadly no longer "with us")
https://www.cpmspectrepi.uk/raspberry_p ... 000zc.html (somewhat unusual "protocol" but still "viable")
Trev.
It was introduced in 1960 as recommended standard and named RS-232. Upon adoption in 1986 it became EIA-232, followed by TIA/EIA-232 in 1991, ANSI/TIA-232 in 2002 and finally just TIA-232 in 2012.
Re: Raspberry Pi 4B interfaces
terribleted wrote: ↑Thu Mar 23, 2023 2:07 pmyou do know I2C has addresses. up to ~100 devices can be connected to a single I2C as long as their addresses differ.
(7 bit addressing... but some are reserved)
https://learn.adafruit.com/adafruits-ra ... guring-i2c
as for UARTs, i found this:
https://pinout.xyz/pinout/uart#:~:text= ... 0your%20Pi.
Hi,
First, thanks for your reply.
I know how I2C works. I need in my design 5 different I2C channels & 4 UART channels.
Re: Raspberry Pi 4B interfaces
But you quite clearly don't know how to read documentation.
If you did you'd know that the BCM2711 used in the 4B has six UARTs and multiple I2C controllers as well as the ability to bitbang I2C and control I2C multiplexers.
Have a read through /boot/overlats/README for how to enable them.
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides