Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vc0t6u$oup6$1@dont-email.me>
Deutsch   English   Français   Italiano  
<vc0t6u$oup6$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: The Natural Philosopher <tnp@invalid.invalid>
Newsgroups: sci.electronics.design,comp.sys.raspberry-pi
Subject: Re: uP port mapping
Date: Fri, 13 Sep 2024 09:30:22 +0100
Organization: A little, after lunch
Lines: 49
Message-ID: <vc0t6u$oup6$1@dont-email.me>
References: <jl51ejh70f9h8cf10pa38t5lhdnhpv4fcg@4ax.com>
 <a+f*gAmUz@news.chiark.greenend.org.uk> <vbv84p$blfk$1@dont-email.me>
 <6jg6ejlh6f0iqo84v2dlo4487fpccprjmh@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 13 Sep 2024 10:30:23 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="8bcbd3f8d2f4cbc06f602d76aec253f3";
	logging-data="817958"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+YXJ5pix71LULY7UFc1NIf7Eme8A3Twt8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Rb21GUA4RPrDtHcRg2Xr+763aaM=
Content-Language: en-GB
In-Reply-To: <6jg6ejlh6f0iqo84v2dlo4487fpccprjmh@4ax.com>

On 12/09/2024 20:35, john larkin wrote:
> RP2040 has I think 2 PIO blocks and each has a couple of hardware
> programmable state machines, and those can be set up to drive pins.
> I'm mostly concerned now with a PCB schematic design, picking the
> appropriate and easy-to-route pins from the CPU to things.
> 
It would be unusual for the pins in numerical order not to be part of 
the same PIO block
So you might as well design the PCB that way.

> My general question, for various processors, is how to associate bits
> in integer variables with physical pins on the chip.

Well that is a software issue.
I thought that on the Pi PICO there was software to do a bulk set of pins

Yes.

https://www.raspberrypi.com/documentation/pico-sdk/hardware.html#functions70
There is a set pins by mask - mask is up to 32 bits - and clear pins by 
mask.

So presumably if you invert the mask (XOR with FFFF) and clear with that 
and set with the original mask and add  a strobe pulse as well to latch 
the data, its three calls in C....or have I misunderstood..not sure if 
you can set AND clear simultaneously.

Now irrespective of whether the hardware supports more, that's as good 
as you are going to get with the C SDK, and presumably only assembler is 
faster. And presumably the actual gpio functions are written in 
assembler anyway. So that (c gpio) will be as good as it gets.

What that leads to in respect of your original question is to treat the 
gpio numbers as if they represented the bits in order.

https://forums.raspberrypi.com/viewtopic.php?t=326719

That conversation implies that they are.

So gpio 0-12 should e.g. go to the DAC lsb->msb set of bots.

These are all arranged in order down one side of the board, so it should 
be easy

Good luck!

-- 
No Apple devices were knowingly used in the preparation of this post.