Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.raspberry-pi > #37926 > unrolled thread

Going to use gpio for the first time

Started byDaniel <me@sc1f1dan.com>
First post2026-04-21 09:53 -0700
Last post2026-04-23 12:36 +0000
Articles 13 — 8 participants

Back to article view | Back to comp.sys.raspberry-pi


Contents

  Going to use gpio for the first time Daniel <me@sc1f1dan.com> - 2026-04-21 09:53 -0700
    Re: Going to use gpio for the first time rbowman <bowman@montana.com> - 2026-04-22 00:54 +0000
      Re: Going to use gpio for the first time Daniel <me@sc1f1dan.com> - 2026-04-22 07:09 -0700
    Re: Going to use gpio for the first time Michael Schwingen <news-1513678000@discworld.dascon.de> - 2026-04-22 16:08 +0000
      Re: Going to use gpio for the first time The Natural Philosopher <tnp@invalid.invalid> - 2026-04-22 20:40 +0100
        Re: Going to use gpio for the first time druck <news@druck.org.uk> - 2026-04-22 21:09 +0100
          Re: Going to use gpio for the first time The Natural Philosopher <tnp@invalid.invalid> - 2026-04-22 21:13 +0100
            Re: Going to use gpio for the first time Theo <theom+news@chiark.greenend.org.uk> - 2026-04-22 23:45 +0100
              Re: Going to use gpio for the first time The Natural Philosopher <tnp@invalid.invalid> - 2026-04-23 09:58 +0100
            Re: Going to use gpio for the first time not@telling.you.invalid (Computer Nerd Kev) - 2026-04-25 08:33 +1000
      Re: Going to use gpio for the first time Daniel <me@sc1f1dan.com> - 2026-04-22 23:55 -0700
        Re: Going to use gpio for the first time rbowman <bowman@montana.com> - 2026-04-23 18:35 +0000
    Re: Going to use gpio for the first time Gordon Henderson <gordon+usenet@drogon.net> - 2026-04-23 12:36 +0000

#37926 — Going to use gpio for the first time

FromDaniel <me@sc1f1dan.com>
Date2026-04-21 09:53 -0700
SubjectGoing to use gpio for the first time
Message-ID<877bq02r1o.fsf@rpi3>
I've been working on a project designing my very first keyboard
matrix. It's not a normal setup, it'll serve as external input for my
tandy pocket computer. Well, V1 will be at least.  

I chose an atmega MCU as suggested by an online buddy and was delighted
to learn that I can program it with my rpi's gpio.

So I ordered a header adapter/expander from pishop. This gave me a
chance to order a few other things I've been putting off, like getting
an inexpensive case for my workhorse 3b+. Also got the inexpensive
(almost cute) gpio reference board for the hell of it.

Are there any newbie things I should look out for while I dive in?
I'll be doing all the work on my trusty stock pi500.

--
Daniel
sysop  | air & wave bbs
finger | calcmandan@bbs.erb.pw

[toc] | [next] | [standalone]


#37928

Fromrbowman <bowman@montana.com>
Date2026-04-22 00:54 +0000
Message-ID<n4qkidFcid9U1@mid.individual.net>
In reply to#37926
On Tue, 21 Apr 2026 09:53:39 -0700, Daniel wrote:

> Are there any newbie things I should look out for while I dive in? I'll
> be doing all the work on my trusty stock pi500.

Which approach are you using, libgpiod, Wiring, or Python?

[toc] | [prev] | [next] | [standalone]


#37930

FromDaniel <me@sc1f1dan.com>
Date2026-04-22 07:09 -0700
Message-ID<87zf2v13zs.fsf@rpi3>
In reply to#37928
rbowman <bowman@montana.com> writes:

> On Tue, 21 Apr 2026 09:53:39 -0700, Daniel wrote:
>
>> Are there any newbie things I should look out for while I dive in? I'll
>> be doing all the work on my trusty stock pi500.
>
> Which approach are you using, libgpiod, Wiring, or Python?

I don't know yet, this is all new to me. Until recently I figured I
would be doing eeprom work with a rom chip but things took a different
turn and, also, my brother has my eeprom writer.

Only now have I cracked open the rpi pdf guide. I'm hoping this grows
into something much more.

--
Daniel
sysop  | air & wave bbs
finger | calcmandan@bbs.erb.pw

[toc] | [prev] | [next] | [standalone]


#37931

FromMichael Schwingen <news-1513678000@discworld.dascon.de>
Date2026-04-22 16:08 +0000
Message-ID<slrn10uhsje.5qh.news-1513678000@a-tuin.ms.intern>
In reply to#37926
On 2026-04-21, Daniel <me@sc1f1dan.com> wrote:
> Are there any newbie things I should look out for while I dive in?
> I'll be doing all the work on my trusty stock pi500.

Be careful about different voltage levels. The atmega *can* run on 5V, while
the raspberry's GPIO pins only tolerate 3.3V.

If you run the atmega from 3.3V too (ideally sourced from the pi, so they
come up at the same time), you have fewer problems.

cu
Michael
-- 
Some people have no respect of age unless it is bottled.

[toc] | [prev] | [next] | [standalone]


#37932

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2026-04-22 20:40 +0100
Message-ID<10sb88a$2gl78$2@dont-email.me>
In reply to#37931
On 22/04/2026 17:08, Michael Schwingen wrote:
> On 2026-04-21, Daniel <me@sc1f1dan.com> wrote:
>> Are there any newbie things I should look out for while I dive in?
>> I'll be doing all the work on my trusty stock pi500.
> 
> Be careful about different voltage levels. The atmega *can* run on 5V, while
> the raspberry's GPIO pins only tolerate 3.3V.
> 
In theory., In practice they can tolerate 5V if not from an uber low 
impedance source

> If you run the atmega from 3.3V too (ideally sourced from the pi, so they
> come up at the same time), you have fewer problems.
> 
> cu
> Michael

-- 
    "Fanaticism consists in redoubling your effort when you have 
forgotten your aim."

  George Santayana

[toc] | [prev] | [next] | [standalone]


#37933

Fromdruck <news@druck.org.uk>
Date2026-04-22 21:09 +0100
Message-ID<10sb9ul$2h0sl$1@druck.eternal-september.org>
In reply to#37932
On 22/04/2026 20:40, The Natural Philosopher wrote:
> On 22/04/2026 17:08, Michael Schwingen wrote:
>> On 2026-04-21, Daniel <me@sc1f1dan.com> wrote:
>>> Are there any newbie things I should look out for while I dive in?
>>> I'll be doing all the work on my trusty stock pi500.
>>
>> Be careful about different voltage levels. The atmega *can* run on 5V, 
>> while
>> the raspberry's GPIO pins only tolerate 3.3V.
>>
> In theory., In practice they can tolerate 5V if not from an uber low 
> impedance source

To avoid tears before bedtime, it is best to disregarded that.

---druck

[toc] | [prev] | [next] | [standalone]


#37934

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2026-04-22 21:13 +0100
Message-ID<10sba51$2h3ih$1@dont-email.me>
In reply to#37933
On 22/04/2026 21:09, druck wrote:
> On 22/04/2026 20:40, The Natural Philosopher wrote:
>> On 22/04/2026 17:08, Michael Schwingen wrote:
>>> On 2026-04-21, Daniel <me@sc1f1dan.com> wrote:
>>>> Are there any newbie things I should look out for while I dive in?
>>>> I'll be doing all the work on my trusty stock pi500.
>>>
>>> Be careful about different voltage levels. The atmega *can* run on 
>>> 5V, while
>>> the raspberry's GPIO pins only tolerate 3.3V.
>>>
>> In theory., In practice they can tolerate 5V if not from an uber low 
>> impedance source
> 
> To avoid tears before bedtime, it is best to disregarded that.
> 
> ---druck

*shrug.* been running that way for some time


-- 
“People believe certain stories because everyone important tells them, 
and people tell those stories because everyone important believes them. 
Indeed, when a conventional wisdom is at its fullest strength, one’s 
agreement with that conventional wisdom becomes almost a litmus test of 
one’s suitability to be taken seriously.”

Paul Krugman

[toc] | [prev] | [next] | [standalone]


#37935

FromTheo <theom+news@chiark.greenend.org.uk>
Date2026-04-22 23:45 +0100
Message-ID<F4l*EpLEA@news.chiark.greenend.org.uk>
In reply to#37934
The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 22/04/2026 21:09, druck wrote:
> > On 22/04/2026 20:40, The Natural Philosopher wrote:
> >> On 22/04/2026 17:08, Michael Schwingen wrote:
> >>> On 2026-04-21, Daniel <me@sc1f1dan.com> wrote:
> >>>> Are there any newbie things I should look out for while I dive in?
> >>>> I'll be doing all the work on my trusty stock pi500.
> >>>
> >>> Be careful about different voltage levels. The atmega *can* run on 
> >>> 5V, while
> >>> the raspberry's GPIO pins only tolerate 3.3V.
> >>>
> >> In theory., In practice they can tolerate 5V if not from an uber low 
> >> impedance source
> > 
> > To avoid tears before bedtime, it is best to disregarded that.
> > 
> > ---druck
> 
> *shrug.* been running that way for some time

Be aware that different Pi SoCs are built on different process nodes, which
may have different high voltage tolerance.  A Pi 4 may be more sensitive
than a Pi 1, and on the Pi 5/500 the GPIO is on a separate I/O chip which
may be different again.

The Pi 500 is now $180 - I wouldn't risk it.

Theo

[toc] | [prev] | [next] | [standalone]


#37937

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2026-04-23 09:58 +0100
Message-ID<10scmv0$2t9jr$4@dont-email.me>
In reply to#37935
On 22/04/2026 23:45, Theo wrote:
> The Pi 500 is now $180 - I wouldn't risk it.

I simply wouldn't buy it at all.


-- 
"Nature does not give up the winter because people dislike the cold."

― Confucius

[toc] | [prev] | [next] | [standalone]


#37940

Fromnot@telling.you.invalid (Computer Nerd Kev)
Date2026-04-25 08:33 +1000
Message-ID<69ebefce@news.ausics.net>
In reply to#37934
The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 22/04/2026 21:09, druck wrote:
>> On 22/04/2026 20:40, The Natural Philosopher wrote:
>>> On 22/04/2026 17:08, Michael Schwingen wrote:
>>>> On 2026-04-21, Daniel <me@sc1f1dan.com> wrote:
>>>>> Are there any newbie things I should look out for while I dive in?
>>>>> I'll be doing all the work on my trusty stock pi500.
>>>>
>>>> Be careful about different voltage levels. The atmega *can* run on 
>>>> 5V, while
>>>> the raspberry's GPIO pins only tolerate 3.3V.
>>>>
>>> In theory., In practice they can tolerate 5V if not from an uber low 
>>> impedance source
>> 
>> To avoid tears before bedtime, it is best to disregarded that.
> 
> *shrug.* been running that way for some time

It'll have protection diodes that limit the voltage at the inputs
to less than the 3.3V supply. However they're not designed to be
used in normal operation so the extra current carried from them
on the power connections inside the chip might upset the voltage
to other parts and cause weird problems, eg. when lots of inputs
go to 5v. So it could be a source of very confusing behaviour and
possible damage, though it's probably a small risk if there are
just a few high-impedance 5V signals connected.

-- 
__          __
#_ < |\| |< _#

[toc] | [prev] | [next] | [standalone]


#37936

FromDaniel <me@sc1f1dan.com>
Date2026-04-22 23:55 -0700
Message-ID<87mryu2mix.fsf@rpi3>
In reply to#37931
Michael Schwingen <news-1513678000@discworld.dascon.de> writes:

> On 2026-04-21, Daniel <me@sc1f1dan.com> wrote:
>> Are there any newbie things I should look out for while I dive in?
>> I'll be doing all the work on my trusty stock pi500.
>
> Be careful about different voltage levels. The atmega *can* run on 5V, while
> the raspberry's GPIO pins only tolerate 3.3V.
>
> If you run the atmega from 3.3V too (ideally sourced from the pi, so they
> come up at the same time), you have fewer problems.

Still haven't initiated planning or coding yet. It's a crazy sports time
for me with basketball playoffs and regular season baseball in full
swing.

Off the top of my head I don't intend on using gpio power. I figure the
atmega could be powered by the bench power supply. The data line could
get a diode, now that you mention the risk of voltage backfeed to
gpio. That, or disconnect the wire between programming steps. And
connect atmega and breadboard ground to gpio ground.

Lacking an EE degree, learning all this magic has been a blast.

Of course, that's just off the top of my head. The pi500 has a different
pinout from other rpi models based on the few bits I've seen in the pdf
guide. I have the gpio extender being shipped and the pinout guide
thingamabob for reference.

--
Daniel
sysop  | air & wave bbs
finger | calcmandan@bbs.erb.pw

[toc] | [prev] | [next] | [standalone]


#37939

Fromrbowman <bowman@montana.com>
Date2026-04-23 18:35 +0000
Message-ID<n4v73qF3sl3U1@mid.individual.net>
In reply to#37936
On Wed, 22 Apr 2026 23:55:50 -0700, Daniel wrote:

> Of course, that's just off the top of my head. The pi500 has a different
> pinout from other rpi models based on the few bits I've seen in the pdf
> guide. I have the gpio extender being shipped and the pinout guide
> thingamabob for reference.

https://thepihut.com/products/pinpal-for-pi-400

I have the breakout board for the Pi 5 and the only difference I see is 
the specialized pins are labeled like SDA1, SCL1 rather than 2 and 3.

https://pinout.xyz/pinout/pin29_gpio5/

[toc] | [prev] | [next] | [standalone]


#37938

FromGordon Henderson <gordon+usenet@drogon.net>
Date2026-04-23 12:36 +0000
Message-ID<10sd3ng$31b2i$1@dont-email.me>
In reply to#37926
In article <877bq02r1o.fsf@rpi3>, Daniel  <me@sc1f1dan.com> wrote:
>I've been working on a project designing my very first keyboard
>matrix. It's not a normal setup, it'll serve as external input for my
>tandy pocket computer. Well, V1 will be at least.  
>
>I chose an atmega MCU as suggested by an online buddy and was delighted
>to learn that I can program it with my rpi's gpio.
>
>So I ordered a header adapter/expander from pishop. This gave me a
>chance to order a few other things I've been putting off, like getting
>an inexpensive case for my workhorse 3b+. Also got the inexpensive
>(almost cute) gpio reference board for the hell of it.
>
>Are there any newbie things I should look out for while I dive in?
>I'll be doing all the work on my trusty stock pi500.

I've been there and done that in the dim and distant past.  (Getboard,
Gertduino, Other *duino boards, my own systems, etc.)

Based on that; I'd strongly suggest you make life easy for yourself:

Get an Arduino UNO and plug it into one of the the Pi's USB ports. Use
that as your ptototyping/development platform.

Forget using the GPIO for SPI/parallel programming - it's just too
much hassle. Too much to go wrong, too many wires. One USB cable and
the job's done and you have an immediate serial console to the AVR too.

Then, once you build your own PCB, if that's the aim, you can put the AVR
into the Arduino board to program it, then move it to your own board. You
can get some nice 28-pin ZIF sockets too.

Alternatively, get a USB ICSP programmer and put an 8-pin header on your
own board and program it that way.

There are many AVR Adruino boards - don't get one with a USB AVR
(e.g. 32u4) and make sure it's a 28-pin DIL version for easy swapping
into your production board. (For rev 1, at least)

This the PC1211/PC1212? (TRS80 Pocket computer?) I have a few - never
thought to hook up an external keyboard though...

Gordon

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.raspberry-pi


csiph-web