Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2024, 09:35:27 09:35


Login with username, password and session length


Pages: [1]
Print
Author Topic: Raspberry PI 4 and the GPIO pins  (Read 6617 times)
0 Members and 1 Guest are viewing this topic.
Sideshow Bob
Cracking Team
Hero Member
****
Offline Offline

Posts: 1001

Thank You
-Given: 231
-Receive: 983



« on: October 06, 2022, 01:03:33 13:03 »

Hi all I have been looking into using Raspberry PI 4 (or 5 when it comes out) in some projects in the future. But as it is now they are sold out world wide. So it would probably take some/long time before I get my hands on one.
But back to my question. In the 40 pin header you have 26 GPIO pins. Are you allowed to do as you want with this pins. So as an example if you do not need the function of an UART (GPIO14 and GPIO15) you will be able to allocate these pins as general IO pins? From a bare metal perspective it should be doable. But I do not know if it is some restrictions in the Linux OS that the PI 4 use regarding this
« Last Edit: October 06, 2022, 01:11:07 13:11 by Sideshow Bob » Logged

I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4666

Thank You
-Given: 833
-Receive: 4319


There is no evidence that I muted SoNsIvRi


« Reply #1 on: October 06, 2022, 01:41:33 13:41 »

The Ra-pi is well documented, official site has the details, reason they are in short supply is they are being bought for the processor and removed to meet demand.  There is a clone of the pi that is buyable some say it's got more speed & power than the original pi. I had a few I bought new that were still boxed I got a very good price on ebay. paid for holiday next year.

https://www.raspberrypi.org/
« Last Edit: October 06, 2022, 01:44:02 13:44 by pickit2 » Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
microstick
Junior Member
**
Offline Offline

Posts: 43

Thank You
-Given: 116
-Receive: 11


« Reply #2 on: October 06, 2022, 04:05:53 16:05 »

Hi,
sudo raspi-config, then disable serial port
BR
Logged
Xwing
Active Member
***
Offline Offline

Posts: 210

Thank You
-Given: 588
-Receive: 1530



« Reply #3 on: October 06, 2022, 09:15:47 21:15 »

So as an example if you do not need the function of an UART (GPIO14 and GPIO15) you will be able to allocate these pins as general IO pins?

All the raspberry GPIO pins can be used as general GPIOs, except the GPIO00 and GPIO07 pins which are reserved for I2C and cannot be used differently.
Logged
Sideshow Bob
Cracking Team
Hero Member
****
Offline Offline

Posts: 1001

Thank You
-Given: 231
-Receive: 983



« Reply #4 on: October 08, 2022, 10:13:20 10:13 »

The Ra-pi is well documented, official site has the details, reason they are in short supply is they are being bought for the processor and removed to meet demand.  There is a clone of the pi that is buyable some say it's got more speed & power than the original pi. I had a few I bought new that were still boxed I got a very good price on ebay. paid for holiday next year.

https://www.raspberrypi.org/
It is a lot of useful information on the net. But without no experience and not having a hands on unit. It is kind of learning to swim on dry land. How much did you get for your units? were they kits(cables, wall plugg, etc) or only the board

Posted on: October 08, 2022, 09:55:32 09:55 - Automerged

All the raspberry GPIO pins can be used as general GPIOs, except the GPIO00 and GPIO07 pins which are reserved for I2C and cannot be used differently.
As I understand the PI 4 boots from an EEPROM using I2C. So after booting the unit up you may use those pins as you want. Kind of impractical though.

Posted on: October 08, 2022, 10:07:11 10:07 - Automerged

Hi,
sudo raspi-config, then disable serial port
BR
I was planning to use C for coding on the PI and using a bare metal register read write aproach. The The pigpio library looks promising for this.
Logged

I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
Manuel
Senior Member
****
Offline Offline

Posts: 329

Thank You
-Given: 678
-Receive: 192


« Reply #5 on: October 08, 2022, 10:31:00 10:31 »

It's quite easy I would say, then enjoy your fantasy to play your ideas....

I installed an image from RASPBERRY.ORG on an SD. (BUSTER or BULLSEYE in my case) remember credentials you generated, those can be useful to connect PC to RASPY to develop.

Booted and configured the right way the necessary info to let me manage I2C (in my case).

Updated the linux version and it's components...

Installed QT5

Installed bcm2835

Installed a virtual keyboard such as matchbox (since I used a touch and LCD 7")

Then used a suite such as VISUALGDB to develope on PC and upload to RASPY....

RASPY in this case connected to local WIFI or using CABLE....same conenction u you used to updatelinux components.


Useful to execute:

sudo apt update
sudo apt full-upgrade

sudo apt clean
sudo apt-get clean

sudo rpi-update
sudo reboot

sudo apt-get install -y gdbserver

sudo apt update
sudo apt upgrade
sudo apt install matchbox-keyboard

// bcm2835
cd ~
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.69.tar.gz
//wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz (check the better version for you.....even further versions can be useful....read carefully doc please)
tar xvfz bcm2835-1.69.tar.gz;
cd bcm2835-1.69
./configure
make
sudo make install

// KEYBOARD
sudo apt update
sudo apt upgrade
sudo apt install matchbox-keyboard

Take care,
X!

Logged

-> An Apple a Day does not Let U become a Macintosh!
anotherandrew
Junior Member
**
Offline Offline

Posts: 94

Thank You
-Given: 766
-Receive: 23


« Reply #6 on: October 09, 2022, 04:44:17 04:44 »

I have bought some dozen banana pi m2 zero from ali in china. cheap and works good and even has the 10/100 ethernet (just add connector, not even magnetics needed). Others have answered your question about uart pin as gpio so I will not repeat their advice.
Logged
norkimo
Junior Member
**
Offline Offline

Posts: 68

Thank You
-Given: 33
-Receive: 71


« Reply #7 on: October 13, 2022, 05:43:47 17:43 »

Would a Zero 2 W be helpful at all for your development testing? I have a couple I am not actively using and can share with you.
Logged
Sideshow Bob
Cracking Team
Hero Member
****
Offline Offline

Posts: 1001

Thank You
-Given: 231
-Receive: 983



« Reply #8 on: October 15, 2022, 08:13:49 08:13 »

I have bought some dozen banana pi m2 zero from ali in china. cheap and works good and even has the 10/100 ethernet (just add connector, not even magnetics needed). Others have answered your question about uart pin as gpio so I will not repeat their advice.
Thank you for your kind offer. But I have managed to source a pi 4 and a Raspberry Pi Zero W. I have toyed a little with them. But due to the current supply constraints. They will not be used in any project at the moment
Logged

I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC